程序包 org.bukkit.damage

# 接口 DamageType

所有超级接口:
  `Keyed`, `Translatable`

@Experimental public interface DamageType extends 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`.

另请参阅:
  - Minecraft Wiki

- ## 字段概要

  字段
  修饰符和类型
  字段
  说明
  `static final DamageType`
  `ARROW`
  `static final DamageType`
  `BAD_RESPAWN_POINT`
  `static final DamageType`
  `CACTUS`
  `static final DamageType`
  `CAMPFIRE`
  `static final DamageType`
  `CRAMMING`
  `static final DamageType`
  `DRAGON_BREATH`
  `static final DamageType`
  `DROWN`
  `static final DamageType`
  `DRY_OUT`
  `static final DamageType`
  `EXPLOSION`
  `static final DamageType`
  `FALL`
  `static final DamageType`
  `FALLING_ANVIL`
  `static final DamageType`
  `FALLING_BLOCK`
  `static final DamageType`
  `FALLING_STALACTITE`
  `static final DamageType`
  `FIREBALL`
  `static final DamageType`
  `FIREWORKS`
  `static final DamageType`
  `FLY_INTO_WALL`
  `static final DamageType`
  `FREEZE`
  `static final DamageType`
  `GENERIC`
  `static final DamageType`
  `GENERIC_KILL`
  `static final DamageType`
  `HOT_FLOOR`
  `static final DamageType`
  `IN_FIRE`
  `static final DamageType`
  `IN_WALL`
  `static final DamageType`
  `INDIRECT_MAGIC`
  `static final DamageType`
  `LAVA`
  `static final DamageType`
  `LIGHTNING_BOLT`
  `static final DamageType`
  `MAGIC`
  `static final DamageType`
  `MOB_ATTACK`
  `static final DamageType`
  `MOB_ATTACK_NO_AGGRO`
  `static final DamageType`
  `MOB_PROJECTILE`
  `static final DamageType`
  `ON_FIRE`
  `static final DamageType`
  `OUT_OF_WORLD`
  `static final DamageType`
  `OUTSIDE_BORDER`
  `static final DamageType`
  `PLAYER_ATTACK`
  `static final DamageType`
  `PLAYER_EXPLOSION`
  `static final DamageType`
  `SONIC_BOOM`
  `static final DamageType`
  `SPIT`
  `static final DamageType`
  `STALAGMITE`
  `static final DamageType`
  `STARVE`
  `static final DamageType`
  `STING`
  `static final DamageType`
  `SWEET_BERRY_BUSH`
  `static final DamageType`
  `THORNS`
  `static final DamageType`
  `THROWN`
  `static final DamageType`
  `TRIDENT`
  `static final DamageType`
  `UNATTRIBUTED_FIREBALL`
  `static final DamageType`
  `WITHER`
  `static final DamageType`
  `WITHER_SKULL`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull DamageEffect`
  `getDamageEffect()`
  Get the `DamageEffect` for this damage type.
  `@NotNull DamageScaling`
  `getDamageScaling()`
  Get the `DamageScaling` for this damage type.
  `@NotNull DeathMessageType`
  `getDeathMessageType()`
  Get the `DeathMessageType` for this damage type.
  `float`
  `getExhaustion()`
  Get the amount of hunger exhaustion caused by this damage type.
  `@NotNull String`
  `getTranslationKey()`
  Get the translation key, suitable for use in a translation component.

  ### 从接口继承的方法 org.bukkit.Keyed

  `getKey`

- ## 字段详细资料

  - ### IN_FIRE

    static final DamageType IN_FIRE

  - ### CAMPFIRE

    static final DamageType CAMPFIRE

  - ### LIGHTNING_BOLT

    static final DamageType LIGHTNING_BOLT

  - ### ON_FIRE

    static final DamageType ON_FIRE

  - ### LAVA

    static final DamageType LAVA

  - ### HOT_FLOOR

    static final DamageType HOT_FLOOR

  - ### IN_WALL

    static final DamageType IN_WALL

  - ### CRAMMING

    static final DamageType CRAMMING

  - ### DROWN

    static final DamageType DROWN

  - ### STARVE

    static final DamageType STARVE

  - ### CACTUS

    static final DamageType CACTUS

  - ### FALL

    static final DamageType FALL

  - ### FLY_INTO_WALL

    static final DamageType FLY_INTO_WALL

  - ### OUT_OF_WORLD

    static final DamageType OUT_OF_WORLD

  - ### GENERIC

    static final DamageType GENERIC

  - ### MAGIC

    static final DamageType MAGIC

  - ### WITHER

    static final DamageType WITHER

  - ### DRAGON_BREATH

    static final DamageType DRAGON_BREATH

  - ### DRY_OUT

    static final DamageType DRY_OUT

  - ### SWEET_BERRY_BUSH

    static final DamageType SWEET_BERRY_BUSH

  - ### FREEZE

    static final DamageType FREEZE

  - ### STALAGMITE

    static final DamageType STALAGMITE

  - ### FALLING_BLOCK

    static final DamageType FALLING_BLOCK

  - ### FALLING_ANVIL

    static final DamageType FALLING_ANVIL

  - ### FALLING_STALACTITE

    static final DamageType FALLING_STALACTITE

  - ### STING

    static final DamageType STING

  - ### MOB_ATTACK

    static final DamageType MOB_ATTACK

  - ### MOB_ATTACK_NO_AGGRO

    static final DamageType MOB_ATTACK_NO_AGGRO

  - ### PLAYER_ATTACK

    static final DamageType PLAYER_ATTACK

  - ### ARROW

    static final DamageType ARROW

  - ### TRIDENT

    static final DamageType TRIDENT

  - ### MOB_PROJECTILE

    static final DamageType MOB_PROJECTILE

  - ### SPIT

    static final DamageType SPIT

  - ### FIREWORKS

    static final DamageType FIREWORKS

  - ### FIREBALL

    static final DamageType FIREBALL

  - ### UNATTRIBUTED_FIREBALL

    static final DamageType UNATTRIBUTED_FIREBALL

  - ### WITHER_SKULL

    static final DamageType WITHER_SKULL

  - ### THROWN

    static final DamageType THROWN

  - ### INDIRECT_MAGIC

    static final DamageType INDIRECT_MAGIC

  - ### THORNS

    static final DamageType THORNS

  - ### EXPLOSION

    static final DamageType EXPLOSION

  - ### PLAYER_EXPLOSION

    static final DamageType PLAYER_EXPLOSION

  - ### SONIC_BOOM

    static final DamageType SONIC_BOOM

  - ### BAD_RESPAWN_POINT

    static final DamageType BAD_RESPAWN_POINT

  - ### OUTSIDE_BORDER

    static final DamageType OUTSIDE_BORDER

  - ### GENERIC_KILL

    static final DamageType GENERIC_KILL

- ## 方法详细资料

  - ### getTranslationKey

    @NotNull @NotNull String 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()` is `DeathMessageType.DEFAULT`

    指定者:
      `getTranslationKey` 在接口中 `Translatable`
    返回:
      the translation key

  - ### getDamageScaling

    @NotNull @NotNull DamageScaling getDamageScaling()
    Get the `DamageScaling` for this damage type.
    返回:
      the damage scaling

  - ### getDamageEffect

    @NotNull @NotNull DamageEffect getDamageEffect()
    Get the `DamageEffect` for this damage type.
    返回:
      the damage effect

  - ### getDeathMessageType

    @NotNull @NotNull DeathMessageType getDeathMessageType()
    Get the `DeathMessageType` for this damage type.
    返回:
      the death message type

  - ### getExhaustion

    float getExhaustion()
    Get the amount of hunger exhaustion caused by this damage type.
    返回:
      the exhaustion