Enum Class Attribute

java.lang.Object
java.lang.Enum<Attribute>
org.bukkit.attribute.Attribute
All Implemented Interfaces:
Serializable, Comparable<Attribute>, Constable, net.kyori.adventure.key.Keyed, Translatable, Keyed, Translatable

public enum Attribute extends Enum<Attribute> implements Keyed, Translatable, Translatable
Types of attributes which may be present on an Attributable.
  • Enum Constant Details

    • GENERIC_MAX_HEALTH

      public static final Attribute GENERIC_MAX_HEALTH
      Maximum health of an Entity.
    • GENERIC_FOLLOW_RANGE

      public static final Attribute GENERIC_FOLLOW_RANGE
      Range at which an Entity will follow others.
    • GENERIC_KNOCKBACK_RESISTANCE

      public static final Attribute GENERIC_KNOCKBACK_RESISTANCE
      Resistance of an Entity to knockback.
    • GENERIC_MOVEMENT_SPEED

      public static final Attribute GENERIC_MOVEMENT_SPEED
      Movement speed of an Entity.
    • GENERIC_FLYING_SPEED

      public static final Attribute GENERIC_FLYING_SPEED
      Flying speed of an Entity.
    • GENERIC_ATTACK_DAMAGE

      public static final Attribute GENERIC_ATTACK_DAMAGE
      Attack damage of an Entity.
    • GENERIC_ATTACK_KNOCKBACK

      public static final Attribute GENERIC_ATTACK_KNOCKBACK
      Attack knockback of an Entity.
    • GENERIC_ATTACK_SPEED

      public static final Attribute GENERIC_ATTACK_SPEED
      Attack speed of an Entity.
    • GENERIC_ARMOR

      public static final Attribute GENERIC_ARMOR
      Armor bonus of an Entity.
    • GENERIC_ARMOR_TOUGHNESS

      public static final Attribute GENERIC_ARMOR_TOUGHNESS
      Armor durability bonus of an Entity.
    • GENERIC_FALL_DAMAGE_MULTIPLIER

      public static final Attribute GENERIC_FALL_DAMAGE_MULTIPLIER
      The fall damage multiplier of an Entity.
    • GENERIC_LUCK

      public static final Attribute GENERIC_LUCK
      Luck bonus of an Entity.
    • GENERIC_MAX_ABSORPTION

      public static final Attribute GENERIC_MAX_ABSORPTION
      Maximum absorption of an Entity.
    • GENERIC_SAFE_FALL_DISTANCE

      public static final Attribute GENERIC_SAFE_FALL_DISTANCE
      The distance which an Entity can fall without damage.
    • GENERIC_SCALE

      public static final Attribute GENERIC_SCALE
      The relative scale of an Entity.
    • GENERIC_STEP_HEIGHT

      public static final Attribute GENERIC_STEP_HEIGHT
      The height which an Entity can walk over.
    • GENERIC_GRAVITY

      public static final Attribute GENERIC_GRAVITY
      The gravity applied to an Entity.
    • GENERIC_JUMP_STRENGTH

      public static final Attribute GENERIC_JUMP_STRENGTH
      Strength with which an Entity will jump.
    • PLAYER_BLOCK_INTERACTION_RANGE

      public static final Attribute PLAYER_BLOCK_INTERACTION_RANGE
      The block reach distance of a Player.
    • PLAYER_ENTITY_INTERACTION_RANGE

      public static final Attribute PLAYER_ENTITY_INTERACTION_RANGE
      The entity reach distance of a Player.
    • PLAYER_BLOCK_BREAK_SPEED

      public static final Attribute PLAYER_BLOCK_BREAK_SPEED
      Block break speed of a Player.
    • ZOMBIE_SPAWN_REINFORCEMENTS

      public static final Attribute ZOMBIE_SPAWN_REINFORCEMENTS
      Chance of a zombie to spawn reinforcements.
  • Method Details

    • values

      public static Attribute[] 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 Attribute 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
    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key
    • getTranslationKey

      @NotNull public @NotNull String getTranslationKey()
      Description copied from interface: Translatable
      Get the translation key, suitable for use in a translation component.
      Specified by:
      getTranslationKey in interface Translatable
      Returns:
      the translation key
    • translationKey

      @NotNull public @NotNull String translationKey()
      Description copied from interface: net.kyori.adventure.translation.Translatable
      Gets the translation key.
      Specified by:
      translationKey in interface Translatable
      Returns:
      the translation key