Package org.bukkit
Enum Class Difficulty
- All Implemented Interfaces:
- Serializable,- Comparable<Difficulty>,- Constable
Represents the various difficulty levels that are available.
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionHostile mobs spawn, enemies deal less damage than on normal difficulty, the hunger bar does deplete and starving deals up to 5 hearts of damage.Hostile mobs spawn, enemies deal greater damage than on normal difficulty, the hunger bar does deplete and starving can kill players.Hostile mobs spawn, enemies deal normal amounts of damage, the hunger bar does deplete and starving deals up to 9.5 hearts of damage.Players regain health over time, hostile mobs don't spawn, the hunger bar does not deplete.
- 
Method SummaryModifier and TypeMethodDescriptionstatic DifficultygetByValue(int value) Deprecated.Magic valueintgetValue()Deprecated.Magic valuestatic DifficultyReturns the enum constant of this class with the specified name.static Difficulty[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
PEACEFULPlayers regain health over time, hostile mobs don't spawn, the hunger bar does not deplete.
- 
EASYHostile mobs spawn, enemies deal less damage than on normal difficulty, the hunger bar does deplete and starving deals up to 5 hearts of damage. (Default value)
- 
NORMALHostile mobs spawn, enemies deal normal amounts of damage, the hunger bar does deplete and starving deals up to 9.5 hearts of damage.
- 
HARDHostile mobs spawn, enemies deal greater damage than on normal difficulty, the hunger bar does deplete and starving can kill players.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getValueDeprecated.Magic valueGets the difficulty value associated with this Difficulty.- Returns:
- An integer value of this difficulty
 
- 
getByValueDeprecated.Magic valueGets the Difficulty represented by the specified value- Parameters:
- value- Value to check
- Returns:
- Associative Difficultywith the given value, or null if it doesn't exist
 
 
-