Package org.bukkit.damage
Interface DamageType
- All Superinterfaces:
Keyed,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 Summary
FieldsModifier 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 DamageType -
Method Summary
Modifier 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.Get the translation key, suitable for use in a translation component.
-
Field Details
-
IN_FIRE
-
LIGHTNING_BOLT
-
ON_FIRE
-
LAVA
-
HOT_FLOOR
-
IN_WALL
-
CRAMMING
-
DROWN
-
STARVE
-
CACTUS
-
FALL
-
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
-
-
Method Details
-
getTranslationKey
Get 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 interfaceTranslatable- Returns:
- the translation key
-
getDamageScaling
Get theDamageScalingfor this damage type.- Returns:
- the damage scaling
-
getDamageEffect
Get theDamageEffectfor this damage type.- Returns:
- the damage effect
-
getDeathMessageType
Get theDeathMessageTypefor this damage type.- Returns:
- the death message type
-
getExhaustion
float getExhaustion()Get the amount of hunger exhaustion caused by this damage type.- Returns:
- the exhaustion
-