Package org.bukkit.damage
Interface DamageType
- All Superinterfaces:
net.kyori.adventure.key.Keyed,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 RegistryAccess.getRegistry(RegistryKey) and RegistryKey.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 DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageTypestatic final DamageType -
Method Summary
Modifier and TypeMethodDescription@NotNull DamageEffectGet theDamageEffectfor this damage type.@NotNull DamageScalingGet theDamageScalingfor this damage type.@NotNull DeathMessageTypeGet theDeathMessageTypefor this damage type.floatGet the amount of hunger exhaustion caused by this damage type.@NotNull StringGet the translation key, suitable for use in a translation component.
-
Field Details
-
ARROW
-
BAD_RESPAWN_POINT
-
CACTUS
-
CAMPFIRE
-
CRAMMING
-
DRAGON_BREATH
-
DROWN
-
DRY_OUT
-
ENDER_PEARL
-
EXPLOSION
-
FALL
-
FALLING_ANVIL
-
FALLING_BLOCK
-
FALLING_STALACTITE
-
FIREBALL
-
FIREWORKS
-
FLY_INTO_WALL
-
FREEZE
-
GENERIC
-
GENERIC_KILL
-
HOT_FLOOR
-
IN_FIRE
-
IN_WALL
-
INDIRECT_MAGIC
-
LAVA
-
LIGHTNING_BOLT
-
MACE_SMASH
-
MAGIC
-
MOB_ATTACK
-
MOB_ATTACK_NO_AGGRO
-
MOB_PROJECTILE
-
ON_FIRE
-
OUT_OF_WORLD
-
OUTSIDE_BORDER
-
PLAYER_ATTACK
-
PLAYER_EXPLOSION
-
SONIC_BOOM
-
SPIT
-
STALAGMITE
-
STARVE
-
STING
-
SWEET_BERRY_BUSH
-
THORNS
-
THROWN
-
TRIDENT
-
UNATTRIBUTED_FIREBALL
-
WIND_CHARGE
-
WITHER
-
WITHER_SKULL
-
-
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
-