Package net.glowstone.entity
Enum Class AttributeManager.Key
- All Implemented Interfaces:
Serializable,Comparable<AttributeManager.Key>,Constable
- Enclosing class:
- AttributeManager
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable AttributeManager.KeyfromAttribute(@NotNull org.bukkit.attribute.Attribute attribute) Get theAttributeManager.Keyfor the correspondingAttribute.static AttributeManager.KeyGet aAttributeManager.Keyby itsattribute name.org.bukkit.attribute.AttributeBukkitAttributecorresponding to this key.doublegetDef()Default attribute value.doublegetMax()Maximum attribute value.doublegetMin()Minimum attribute value.toString()static AttributeManager.KeyReturns the enum constant of this class with the specified name.static AttributeManager.Key[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
KEY_MAX_HEALTH
-
KEY_FOLLOW_RANGE
-
KEY_KNOCKBACK_RESISTANCE
-
KEY_MOVEMENT_SPEED
-
KEY_ATTACK_DAMAGE
-
KEY_ATTACK_SPEED
-
KEY_ARMOR
-
KEY_ARMOR_TOUGHNESS
-
KEY_LUCK
-
KEY_FLYING_SPEED
-
KEY_HORSE_JUMP_STRENGTH
-
KEY_ZOMBIE_SPAWN_REINFORCEMENTS
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-
fromName
Get aAttributeManager.Keyby itsattribute name.- Parameters:
name- of the attribute to return- Returns:
- the attribute with the specified name or
null
-
fromAttribute
@Nullable public static @Nullable AttributeManager.Key fromAttribute(@NotNull @NotNull org.bukkit.attribute.Attribute attribute) Get theAttributeManager.Keyfor the correspondingAttribute.- Parameters:
attribute- attribute from Bukkit api- Returns:
- key corresponding to the attribute or
null
-
toString
- Overrides:
toStringin classEnum<AttributeManager.Key>
-
getAttribute
public org.bukkit.attribute.Attribute getAttribute()BukkitAttributecorresponding to this key. -
getDef
public double getDef()Default attribute value. -
getMin
public double getMin()Minimum attribute value. -
getMax
public double getMax()Maximum attribute value.
-