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
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable AttributeManager.Key
fromAttribute
(@NotNull org.bukkit.attribute.Attribute attribute) Get theAttributeManager.Key
for the correspondingAttribute
.static AttributeManager.Key
Get aAttributeManager.Key
by itsattribute name
.org.bukkit.attribute.Attribute
BukkitAttribute
corresponding to this key.double
getDef()
Default attribute value.double
getMax()
Maximum attribute value.double
getMin()
Minimum attribute value.toString()
static AttributeManager.Key
Returns 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.Key
by 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.Key
for the correspondingAttribute
.- Parameters:
attribute
- attribute from Bukkit api- Returns:
- key corresponding to the attribute or
null
-
toString
- Overrides:
toString
in classEnum<AttributeManager.Key>
-
getAttribute
public org.bukkit.attribute.Attribute getAttribute()BukkitAttribute
corresponding to this key. -
getDef
public double getDef()Default attribute value. -
getMin
public double getMin()Minimum attribute value. -
getMax
public double getMax()Maximum attribute value.
-