Package org.bukkit.event.entity
Enum EntityDamageEvent.DamageCause
- All Implemented Interfaces:
Serializable
,Comparable<EntityDamageEvent.DamageCause>
,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
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOCK_EXPLOSION
Damage caused by being in the area when a block explodes.CONTACT
Damage caused when an entity contacts a block such as a Cactus.CRAMMING
Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.CUSTOM
Custom damage.DRAGON_BREATH
Damage caused by a dragon breathing fire.DROWNING
Damage caused by running out of air while in waterDRYOUT
Damage caused when an entity that should be in water is not.ENTITY_ATTACK
Damage caused when an entity attacks another entity.ENTITY_EXPLOSION
Damage caused by being in the area when an entity, such as a Creeper, explodes.ENTITY_SWEEP_ATTACK
Damage caused when an entity attacks another entity in a sweep attack.FALL
Damage caused when an entity falls a distance greater than 3 blocksFALLING_BLOCK
Damage caused by being hit by a falling block which deals damageFIRE
Damage caused by direct exposure to fireFIRE_TICK
Damage caused due to burns caused by fireFLY_INTO_WALL
Damage caused when an entity runs into a wall.HOT_FLOOR
Damage caused when an entity steps onMaterial.MAGMA_BLOCK
.LAVA
Damage caused by direct exposure to lavaLIGHTNING
Damage caused by being struck by lightningMAGIC
Damage caused by being hit by a damage potion or spellMELTING
Damage caused due to a snowman meltingPOISON
Damage caused due to an ongoing poison effectPROJECTILE
Damage caused when attacked by a projectile.STARVATION
Damage caused by starving due to having an empty hunger barSUFFOCATION
Damage caused by being put in a blockSUICIDE
Damage caused by committing suicide using the command "/kill"THORNS
Damage caused in retaliation to another attack by the Thorns enchantment.VOID
Damage caused by falling into the voidWITHER
Damage caused by Wither potion effect -
Method Summary
Modifier and Type Method Description static EntityDamageEvent.DamageCause
valueOf(String name)
Returns the enum constant of this type with the specified name.static EntityDamageEvent.DamageCause[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CONTACT
Damage caused when an entity contacts a block such as a Cactus.Damage: 1 (Cactus)
-
ENTITY_ATTACK
Damage caused when an entity attacks another entity.Damage: variable
-
ENTITY_SWEEP_ATTACK
Damage caused when an entity attacks another entity in a sweep attack.Damage: variable
-
PROJECTILE
Damage caused when attacked by a projectile.Damage: variable
-
SUFFOCATION
Damage caused by being put in a blockDamage: 1
-
FALL
Damage caused when an entity falls a distance greater than 3 blocksDamage: fall height - 3.0
-
FIRE
Damage caused by direct exposure to fireDamage: 1
-
FIRE_TICK
Damage caused due to burns caused by fireDamage: 1
-
MELTING
Damage caused due to a snowman meltingDamage: 1
-
LAVA
Damage caused by direct exposure to lavaDamage: 4
-
DROWNING
Damage caused by running out of air while in waterDamage: 2
-
BLOCK_EXPLOSION
Damage caused by being in the area when a block explodes.Damage: variable
-
ENTITY_EXPLOSION
Damage caused by being in the area when an entity, such as a Creeper, explodes.Damage: variable
-
VOID
Damage caused by falling into the voidDamage: 4 for players
-
LIGHTNING
Damage caused by being struck by lightningDamage: 5
-
SUICIDE
Damage caused by committing suicide using the command "/kill"Damage: 1000
-
STARVATION
Damage caused by starving due to having an empty hunger barDamage: 1
-
POISON
Damage caused due to an ongoing poison effectDamage: 1
-
MAGIC
Damage caused by being hit by a damage potion or spellDamage: variable
-
WITHER
Damage caused by Wither potion effect -
FALLING_BLOCK
Damage caused by being hit by a falling block which deals damageNote: Not every block deals damage
Damage: variable
-
THORNS
Damage caused in retaliation to another attack by the Thorns enchantment.Damage: 1-4 (Thorns)
-
DRAGON_BREATH
Damage caused by a dragon breathing fire.Damage: variable
-
CUSTOM
Custom damage.Damage: variable
-
FLY_INTO_WALL
Damage caused when an entity runs into a wall.Damage: variable
-
HOT_FLOOR
Damage caused when an entity steps onMaterial.MAGMA_BLOCK
.Damage: 1
-
CRAMMING
Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.Damage: 6
-
DRYOUT
Damage caused when an entity that should be in water is not.Damage: 1
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-