Enum ArmorType

java.lang.Object
java.lang.Enum<ArmorType>
com.jeff_media.armorequipevent.ArmorType
All Implemented Interfaces:
Serializable, Comparable<ArmorType>, java.lang.constant.Constable

public enum ArmorType extends Enum<ArmorType>
Represents the different types of armor.
Since:
Jul 30, 2015
Author:
Arnah
  • Enum Constant Details

    • HELMET

      public static final ArmorType HELMET
      Represents armor belonging to the helmet slot, e.g. helmets, skulls, and carved pumpkins.
    • CHESTPLATE

      public static final ArmorType CHESTPLATE
      Represents armor belonging to the chestplate slot, e.g. chestplates and elytras.
    • LEGGINGS

      public static final ArmorType LEGGINGS
      Represents leggings.
    • BOOTS

      public static final ArmorType BOOTS
      Represents boots.
  • Method Details

    • values

      public static ArmorType[] 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

      public static ArmorType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • matchType

      public static ArmorType matchType(ItemStack itemStack)
      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

      public int getSlot()
      Returns the raw slot where this piece of armor usually gets equipped
      Returns:
      Raw slot belonging to this piece of armor