Enum Class AttributeManager.Key

java.lang.Object
java.lang.Enum<AttributeManager.Key>
net.glowstone.entity.AttributeManager.Key
All Implemented Interfaces:
Serializable, Comparable<AttributeManager.Key>, Constable
Enclosing class:
AttributeManager

public static enum AttributeManager.Key extends Enum<AttributeManager.Key>
  • Enum Constant Details

  • Method Details

    • values

      public static AttributeManager.Key[] 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 AttributeManager.Key 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
    • fromName

      public static AttributeManager.Key fromName(String name)
      Parameters:
      name - of the attribute to return
      Returns:
      the attribute with the specified name or null
    • fromAttribute

      @Nullable public static @Nullable AttributeManager.Key fromAttribute(@NotNull @NotNull org.bukkit.attribute.Attribute attribute)
      Get the AttributeManager.Key for the corresponding Attribute.
      Parameters:
      attribute - attribute from Bukkit api
      Returns:
      key corresponding to the attribute or null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<AttributeManager.Key>
    • getAttribute

      public org.bukkit.attribute.Attribute getAttribute()
      Bukkit Attribute corresponding to this key.
    • getDef

      public double getDef()
      Default attribute value.
    • getMin

      public double getMin()
      Minimum attribute value.
    • getMax

      public double getMax()
      Maximum attribute value.