Enum Class PlayerArmorChangeEvent.SlotType

java.lang.Object
java.lang.Enum<PlayerArmorChangeEvent.SlotType>
com.destroystokyo.paper.event.player.PlayerArmorChangeEvent.SlotType
All Implemented Interfaces:
Serializable, Comparable<PlayerArmorChangeEvent.SlotType>, Constable
Enclosing class:
PlayerArmorChangeEvent

public static enum PlayerArmorChangeEvent.SlotType extends Enum<PlayerArmorChangeEvent.SlotType>
  • Enum Constant Details

  • Method Details

    • values

      public static PlayerArmorChangeEvent.SlotType[] 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 PlayerArmorChangeEvent.SlotType 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
    • getTypes

      public Set<Material> getTypes()
      Gets an immutable set of all allowed material types that can be placed in an armor slot.
      Returns:
      immutable set of material types
    • getByMaterial

      public static @Nullable PlayerArmorChangeEvent.SlotType getByMaterial(Material material)
      Gets the type of slot via the specified material
      Parameters:
      material - material to get slot by
      Returns:
      slot type the material will go in, or null if it won't
    • isEquipable

      public static boolean isEquipable(Material material)
      Gets whether this material can be equipped to a slot
      Parameters:
      material - material to check
      Returns:
      whether this material can be equipped