Enum Class ArmorSlot

java.lang.Object
java.lang.Enum<ArmorSlot>
net.apartium.cocoabeans.spigot.inventory.ArmorSlot
All Implemented Interfaces:
Serializable, Comparable<ArmorSlot>, Constable

public enum ArmorSlot extends Enum<ArmorSlot>
Represents a possible armor slot, for example helmet or boots
  • Enum Constant Details

    • HELMET

      public static final ArmorSlot HELMET
    • CHESTPLATE

      public static final ArmorSlot CHESTPLATE
    • LEGGINGS

      public static final ArmorSlot LEGGINGS
    • BOOTS

      public static final ArmorSlot BOOTS
  • Method Details

    • values

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

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

      @Nullable public static ArmorSlot getArmorSlotType(org.bukkit.inventory.ItemStack item)
      Return matching armor slot for given item stack based on type
      Parameters:
      item - item stack instance
      Returns:
      armor slot if any, otherwise null
    • getArmorSlotType

      @Nullable public static ArmorSlot getArmorSlotType(org.bukkit.Material type)
      Return matching armor slot for given item stack based on type
      Parameters:
      type - item stack material
      Returns:
      armor slot if any, otherwise null
    • getSlot

      public int getSlot()
      Get inventory slot associated with armor slot
      Returns:
      inventory slot associated with armor slot