Package org.bukkit.event.entity
Enum Class EntityDamageEvent.DamageCause
- All Implemented Interfaces:
- Serializable,- Comparable<EntityDamageEvent.DamageCause>,- Constable
- Enclosing class:
- EntityDamageEvent
An enum to specify the cause of the damage
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionDamage caused by being in the area when a block explodes.Damage caused when an entity steps onMaterial.CAMPFIREorMaterial.SOUL_CAMPFIRE.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 waterDamage 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 blocksDamage caused by being hit by a falling block which deals damageDamage caused by direct exposure to fireDamage caused due to burns caused by fireDamage caused when an entity runs into a wall.Damage caused from freezing.Damage caused when an entity steps onMaterial.MAGMA_BLOCK.Damage caused by /kill commandDamage caused by direct exposure to lavaDamage caused by being struck by lightningDamage caused by being hit by a damage potion or spellDamage caused due to a snowman meltingDamage caused due to an ongoing poison effectDamage caused when attacked by a projectile.Damage caused by the Sonic Boom attack fromWardenDamage caused by starving due to having an empty hunger barDamage caused by being put in a blockDamage caused by committing suicide.Damage caused in retaliation to another attack by the Thorns enchantment.Damage caused by falling into the voidDamage caused by Wither potion effectDamage caused by the World Border
- 
Method SummaryModifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static EntityDamageEvent.DamageCause[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
KILLDamage caused by /kill commandDamage: Float.MAX_VALUE
- 
WORLD_BORDERDamage caused by the World BorderDamage: WorldBorder.getDamageAmount()
- 
CONTACTDamage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.Damage: variable 
- 
ENTITY_ATTACKDamage caused when an entity attacks another entity.Damage: variable 
- 
ENTITY_SWEEP_ATTACKDamage caused when an entity attacks another entity in a sweep attack.Damage: variable 
- 
PROJECTILEDamage caused when attacked by a projectile.Damage: variable 
- 
SUFFOCATIONDamage caused by being put in a blockDamage: 1 
- 
FALLDamage caused when an entity falls a distance greater than 3 blocksDamage: fall height - 3.0 
- 
FIREDamage caused by direct exposure to fireDamage: 1 
- 
FIRE_TICKDamage caused due to burns caused by fireDamage: 1 
- 
MELTINGDamage caused due to a snowman meltingDamage: 1 
- 
LAVADamage caused by direct exposure to lavaDamage: 4 
- 
DROWNINGDamage caused by running out of air while in waterDamage: 2 
- 
BLOCK_EXPLOSIONDamage caused by being in the area when a block explodes.Damage: variable 
- 
ENTITY_EXPLOSIONDamage caused by being in the area when an entity, such as a Creeper, explodes.Damage: variable 
- 
VOIDDamage caused by falling into the voidDamage: 4 for players 
- 
LIGHTNINGDamage caused by being struck by lightningDamage: 5 
- 
SUICIDEDamage caused by committing suicide.Note: This is currently only used by plugins, default commands like /minecraft:kill use KILLto damage players.Damage: variable 
- 
STARVATIONDamage caused by starving due to having an empty hunger barDamage: 1 
- 
POISONDamage caused due to an ongoing poison effectDamage: 1 
- 
MAGICDamage caused by being hit by a damage potion or spellDamage: variable 
- 
WITHERDamage caused by Wither potion effect
- 
FALLING_BLOCKDamage caused by being hit by a falling block which deals damageNote: Not every block deals damage Damage: variable 
- 
THORNSDamage caused in retaliation to another attack by the Thorns enchantment.Damage: 1-4 (Thorns) 
- 
DRAGON_BREATHDamage caused by a dragon breathing fire.Damage: variable 
- 
CUSTOMCustom damage.Damage: variable 
- 
FLY_INTO_WALLDamage caused when an entity runs into a wall.Damage: variable 
- 
HOT_FLOORDamage caused when an entity steps onMaterial.MAGMA_BLOCK.Damage: 1 
- 
CAMPFIRE
- 
CRAMMINGDamage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.Damage: 6 
- 
DRYOUTDamage caused when an entity that should be in water is not.Damage: 1 
- 
FREEZEDamage caused from freezing.Damage: 1 or 5 
- 
SONIC_BOOMDamage caused by the Sonic Boom attack fromWardenDamage: 10 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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
 
 
-