Enum EntityDamageEvent.DamageCause

java.lang.Object
java.lang.Enum<EntityDamageEvent.DamageCause>
org.bukkit.event.entity.EntityDamageEvent.DamageCause
All Implemented Interfaces:
Serializable, Comparable<EntityDamageEvent.DamageCause>, java.lang.constant.Constable
Enclosing class:
EntityDamageEvent

public static enum EntityDamageEvent.DamageCause extends Enum<EntityDamageEvent.DamageCause>
An enum to specify the cause of the damage
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Damage caused by being in the area when a block explodes.
    Damage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.
    Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.
    Custom damage.
    Damage caused by a dragon breathing fire.
    Damage caused by running out of air while in water
    Damage caused when an entity that should be in water is not.
    Damage caused when an entity attacks another entity.
    Damage caused by being in the area when an entity, such as a Creeper, explodes.
    Damage caused when an entity attacks another entity in a sweep attack.
    Damage caused when an entity falls a distance greater than 3 blocks
    Damage caused by being hit by a falling block which deals damage
    Damage caused by direct exposure to fire
    Damage caused due to burns caused by fire
    Damage caused when an entity runs into a wall.
    Damage caused from freezing.
    Damage caused when an entity steps on Material.MAGMA_BLOCK.
    Damage caused by direct exposure to lava
    Damage caused by being struck by lightning
    Damage caused by being hit by a damage potion or spell
    Damage caused due to a snowman melting
    Damage caused due to an ongoing poison effect
    Damage caused when attacked by a projectile.
    Damage caused by starving due to having an empty hunger bar
    Damage caused by being put in a block
    Damage caused by committing suicide.
    Damage caused in retaliation to another attack by the Thorns enchantment.
    Damage caused by falling into the void
    Damage caused by Wither potion effect
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Method Details

    • values

      public static EntityDamageEvent.DamageCause[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EntityDamageEvent.DamageCause valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null