Package net.glowstone.inventory
Enum Class ArmorConstants
- All Implemented Interfaces:
Serializable
,Comparable<ArmorConstants>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionint
static int
getDefense
(org.bukkit.inventory.ItemStack[] armor) Calculate total defense of a suit of armor.int
static int
getToughness
(org.bukkit.inventory.ItemStack[] armor) Calculate total toughness of a suit of armor.static ArmorConstants
Returns the enum constant of this class with the specified name.static ArmorConstants[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LEATHER_HELMET
-
LEATHER_CHESTPLATE
-
LEATHER_LEGGINGS
-
LEATHER_BOOTS
-
GOLDEN_HELMET
-
GOLDEN_CHESTPLATE
-
GOLDEN_LEGGINGS
-
GOLDEN_BOOTS
-
CHAINMAIL_HELMET
-
CHAINMAIL_CHESTPLATE
-
CHAINMAIL_LEGGINGS
-
CHAINMAIL_BOOTS
-
IRON_HELMET
-
IRON_CHESTPLATE
-
IRON_LEGGINGS
-
IRON_BOOTS
-
DIAMOND_HELMET
-
DIAMOND_CHESTPLATE
-
DIAMOND_LEGGINGS
-
DIAMOND_BOOTS
-
-
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
-
getDefense
public static int getDefense(org.bukkit.inventory.ItemStack[] armor) Calculate total defense of a suit of armor.- Parameters:
armor
- all armor items worn- Returns:
- the total defense
-
getToughness
public static int getToughness(org.bukkit.inventory.ItemStack[] armor) Calculate total toughness of a suit of armor.- Parameters:
armor
- all armor items worn- Returns:
- the total toughness
-
getDefense
public int getDefense() -
getToughness
public int getToughness()
-