public static enum EntityDamageEvent.DamageCause extends Enum<EntityDamageEvent.DamageCause>
| Enum Constant and Description | 
|---|
| BLOCK_EXPLOSIONDamage caused by being in the area when a block explodes. | 
| CONTACTDamage caused when an entity contacts a block such as a Cactus. | 
| CUSTOMCustom damage. | 
| DRAGON_BREATHDamage caused by a dragon breathing fire. | 
| DROWNINGDamage caused by running out of air while in water | 
| ENTITY_ATTACKDamage caused when an entity attacks another entity. | 
| ENTITY_EXPLOSIONDamage caused by being in the area when an entity, such as a
 Creeper, explodes. | 
| FALLDamage caused when an entity falls a distance greater than 3 blocks | 
| FALLING_BLOCKDamage caused by being hit by a falling block which deals damage | 
| FIREDamage caused by direct exposure to fire | 
| FIRE_TICKDamage caused due to burns caused by fire | 
| FLY_INTO_WALLDamage caused when an entity runs into a wall. | 
| HOT_FLOORDamage caused when an entity steps on  Material.MAGMA. | 
| LAVADamage caused by direct exposure to lava | 
| LIGHTNINGDamage caused by being struck by lightning | 
| MAGICDamage caused by being hit by a damage potion or spell | 
| MELTINGDamage caused due to a snowman melting | 
| POISONDamage caused due to an ongoing poison effect | 
| PROJECTILEDamage caused when attacked by a projectile. | 
| STARVATIONDamage caused by starving due to having an empty hunger bar | 
| SUFFOCATIONDamage caused by being put in a block | 
| SUICIDEDamage caused by committing suicide using the command "/kill" | 
| THORNSDamage caused in retaliation to another attack by the Thorns
 enchantment. | 
| VOIDDamage caused by falling into the void | 
| WITHERDamage caused by Wither potion effect | 
| Modifier and Type | Method and 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. | 
public static final EntityDamageEvent.DamageCause CONTACT
Damage: 1 (Cactus)
public static final EntityDamageEvent.DamageCause ENTITY_ATTACK
Damage: variable
public static final EntityDamageEvent.DamageCause PROJECTILE
Damage: variable
public static final EntityDamageEvent.DamageCause SUFFOCATION
Damage: 1
public static final EntityDamageEvent.DamageCause FALL
Damage: fall height - 3.0
public static final EntityDamageEvent.DamageCause FIRE
Damage: 1
public static final EntityDamageEvent.DamageCause FIRE_TICK
Damage: 1
public static final EntityDamageEvent.DamageCause MELTING
Damage: 1
public static final EntityDamageEvent.DamageCause LAVA
Damage: 4
public static final EntityDamageEvent.DamageCause DROWNING
Damage: 2
public static final EntityDamageEvent.DamageCause BLOCK_EXPLOSION
Damage: variable
public static final EntityDamageEvent.DamageCause ENTITY_EXPLOSION
Damage: variable
public static final EntityDamageEvent.DamageCause VOID
Damage: 4 for players
public static final EntityDamageEvent.DamageCause LIGHTNING
Damage: 5
public static final EntityDamageEvent.DamageCause SUICIDE
Damage: 1000
public static final EntityDamageEvent.DamageCause STARVATION
Damage: 1
public static final EntityDamageEvent.DamageCause POISON
Damage: 1
public static final EntityDamageEvent.DamageCause MAGIC
Damage: variable
public static final EntityDamageEvent.DamageCause WITHER
public static final EntityDamageEvent.DamageCause FALLING_BLOCK
Note: Not every block deals damage
Damage: variable
public static final EntityDamageEvent.DamageCause THORNS
Damage: 1-4 (Thorns)
public static final EntityDamageEvent.DamageCause DRAGON_BREATH
Damage: variable
public static final EntityDamageEvent.DamageCause CUSTOM
Damage: variable
public static final EntityDamageEvent.DamageCause FLY_INTO_WALL
Damage: variable
public static final EntityDamageEvent.DamageCause HOT_FLOOR
Material.MAGMA.
 Damage: 1
public static EntityDamageEvent.DamageCause[] values()
for (EntityDamageEvent.DamageCause c : EntityDamageEvent.DamageCause.values()) System.out.println(c);
public static EntityDamageEvent.DamageCause valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2016. All rights reserved.