Package org.bukkit.damage
Interface DamageType
- All Superinterfaces:
- Keyed,- RegistryAware,- Translatable
Represent a type of damage that an entity can receive.
 
 Constants in this class include the base types provided by the vanilla
 server. Data packs are capable of registering more types of damage which may
 be obtained through the Registry.DAMAGE_TYPE.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageType
- 
Method SummaryModifier and TypeMethodDescriptionGet theDamageEffectfor this damage type.Get theDamageScalingfor this damage type.Get theDeathMessageTypefor this damage type.floatGet the amount of hunger exhaustion caused by this damage type.getKey()Deprecated.Get the translation key, suitable for use in a translation component.Methods inherited from interface org.bukkit.registry.RegistryAwaregetKeyOrNull, getKeyOrThrow, isRegistered
- 
Field Details- 
IN_FIRE
- 
CAMPFIRE
- 
LIGHTNING_BOLT
- 
ON_FIRE
- 
LAVA
- 
HOT_FLOOR
- 
IN_WALL
- 
CRAMMING
- 
DROWN
- 
STARVE
- 
CACTUS
- 
FALL
- 
ENDER_PEARL
- 
FLY_INTO_WALL
- 
OUT_OF_WORLD
- 
GENERIC
- 
MAGIC
- 
WITHER
- 
DRAGON_BREATH
- 
DRY_OUT
- 
SWEET_BERRY_BUSH
- 
FREEZE
- 
STALAGMITE
- 
FALLING_BLOCK
- 
FALLING_ANVIL
- 
FALLING_STALACTITE
- 
STING
- 
MOB_ATTACK
- 
MOB_ATTACK_NO_AGGRO
- 
PLAYER_ATTACK
- 
ARROW
- 
TRIDENT
- 
MOB_PROJECTILE
- 
SPIT
- 
FIREWORKS
- 
FIREBALL
- 
UNATTRIBUTED_FIREBALL
- 
WITHER_SKULL
- 
THROWN
- 
INDIRECT_MAGIC
- 
THORNS
- 
EXPLOSION
- 
PLAYER_EXPLOSION
- 
SONIC_BOOM
- 
BAD_RESPAWN_POINT
- 
OUTSIDE_BORDER
- 
GENERIC_KILL
- 
WIND_CHARGE
- 
MACE_SMASH
 
- 
- 
Method Details- 
getTranslationKeyGet the translation key, suitable for use in a translation component.The returned key is that of the death message sent when this damage type is responsible for the death of an entity. Note This translation key is only used if getDeathMessageType()isDeathMessageType.DEFAULT- Specified by:
- getTranslationKeyin interface- Translatable
- Returns:
- the translation key
 
- 
getDamageScalingGet theDamageScalingfor this damage type.- Returns:
- the damage scaling
 
- 
getDamageEffectGet theDamageEffectfor this damage type.- Returns:
- the damage effect
 
- 
getDeathMessageTypeGet theDeathMessageTypefor this damage type.- Returns:
- the death message type
 
- 
getExhaustionfloat getExhaustion()Get the amount of hunger exhaustion caused by this damage type.- Returns:
- the exhaustion
 
- 
getKeyDeprecated.A key might not always be present, useRegistryAware.getKeyOrThrow()instead.Return the namespaced identifier for this object.
 
- 
RegistryAware.getKeyOrThrow()instead.