|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Difficulty> org.bukkit.Difficulty
public enum Difficulty
Represents the various difficulty levels that are available.
Enum Constant Summary | |
---|---|
EASY
Hostile mobs spawn, enemies deal less damage than on normal difficulty, the hunger bar does deplete and starving deals up to 5 hearts of damage. |
|
HARD
Hostile mobs spawn, enemies deal greater damage than on normal difficulty, the hunger bar does deplete and starving can kill players. |
|
NORMAL
Hostile mobs spawn, enemies deal normal amounts of damage, the hunger bar does deplete and starving deals up to 9.5 hearts of damage. |
|
PEACEFUL
Players regain health over time, hostile mobs don't spawn, the hunger bar does not deplete. |
Method Summary | |
---|---|
static Difficulty |
getByValue(int value)
Gets the Difficulty represented by the specified value |
int |
getValue()
Gets the difficulty value associated with this Difficulty. |
static Difficulty |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Difficulty[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Difficulty PEACEFUL
public static final Difficulty EASY
public static final Difficulty NORMAL
public static final Difficulty HARD
Method Detail |
---|
public static final Difficulty[] values()
for(Difficulty c : Difficulty.values()) System.out.println(c);
public static Difficulty valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified namepublic int getValue()
public static Difficulty getByValue(int value)
value
- Value to check
Difficulty
with the given value, or null if it doesn't exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |