Enum Class ArmorConstants

java.lang.Object
java.lang.Enum<ArmorConstants>
net.glowstone.inventory.ArmorConstants
All Implemented Interfaces:
Serializable, Comparable<ArmorConstants>, Constable

public enum ArmorConstants extends Enum<ArmorConstants>
  • Enum Constant Details

  • Method Details

    • values

      public static ArmorConstants[] 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 ArmorConstants 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
    • 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()