Package com.jeff_media.armorequipevent
Enum ArmorType
- All Implemented Interfaces:
Serializable,Comparable<ArmorType>,java.lang.constant.Constable
Represents the different types of armor.
- Since:
- Jul 30, 2015
- Author:
- Arnah
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents boots.Represents armor belonging to the chestplate slot, e.g. chestplates and elytras.Represents armor belonging to the helmet slot, e.g. helmets, skulls, and carved pumpkins.Represents leggings. -
Method Summary
Modifier and TypeMethodDescriptionintgetSlot()Returns the raw slot where this piece of armor usually gets equippedstatic ArmorTypeAttempts to match the ArmorType for the specified ItemStack.static ArmorTypeReturns the enum constant of this type with the specified name.static ArmorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HELMET
Represents armor belonging to the helmet slot, e.g. helmets, skulls, and carved pumpkins. -
CHESTPLATE
Represents armor belonging to the chestplate slot, e.g. chestplates and elytras. -
LEGGINGS
Represents leggings. -
BOOTS
Represents boots.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
matchType
Attempts to match the ArmorType for the specified ItemStack.- Parameters:
itemStack- The ItemStack to parse the type of.- Returns:
- The parsed ArmorType, or null if not found.
-
getSlot
Returns the raw slot where this piece of armor usually gets equipped- Returns:
- Raw slot belonging to this piece of armor
-