枚举 EntityDamageEvent.DamageCause

java.lang.Object
java.lang.Enum<EntityDamageEvent.DamageCause>
org.bukkit.event.entity.EntityDamageEvent.DamageCause
所有已实现的接口:
Serializable, Comparable<EntityDamageEvent.DamageCause>, java.lang.constant.Constable
封闭类:
EntityDamageEvent

public static enum EntityDamageEvent.DamageCause extends Enum<EntityDamageEvent.DamageCause>
造成伤害的原因.
  • 枚举常量详细资料

    • CONTACT

      public static final EntityDamageEvent.DamageCause CONTACT
      实体接触仙人掌、钟乳石(石笋)或浆果丛等方块时受到的伤害.

      伤害:动态改变.

      原文: Damage caused when an entity contacts a block such as a Cactus, Dripstone (Stalagmite) or Berry Bush.

      Damage: variable

    • ENTITY_ATTACK

      public static final EntityDamageEvent.DamageCause ENTITY_ATTACK
      一个实体攻击另一个实体时受到的伤害.

      伤害:动态改变.

      原文: Damage caused when an entity attacks another entity.

      Damage: variable

    • ENTITY_SWEEP_ATTACK

      public static final EntityDamageEvent.DamageCause ENTITY_SWEEP_ATTACK
      一个实体在横扫范围中攻击到另一个实体时受到的伤害.

      伤害:动态改变.

      原文: Damage caused when an entity attacks another entity in a sweep attack.

      Damage: variable

    • PROJECTILE

      public static final EntityDamageEvent.DamageCause PROJECTILE
      被抛射物攻击时受到的伤害.

      伤害:动态改变.

      原文: Damage caused when attacked by a projectile.

      Damage: variable

    • SUFFOCATION

      public static final EntityDamageEvent.DamageCause SUFFOCATION
      被方块卡住受到的伤害.

      伤害:1.

      原文: Damage caused by being put in a block

      Damage: 1

    • FALL

      public static final EntityDamageEvent.DamageCause FALL
      实体掉落高度大于 3 格时受到的伤害.

      伤害: 掉落高度 - 3.0.

      原文: Damage caused when an entity falls a distance greater than 3 blocks

      Damage: fall height - 3.0

    • FIRE

      public static final EntityDamageEvent.DamageCause FIRE
      直接暴露在火中受到的伤害.

      伤害: 1.

      原文: Damage caused by direct exposure to fire

      Damage: 1

    • FIRE_TICK

      public static final EntityDamageEvent.DamageCause FIRE_TICK
      由于烧伤造成的伤害.

      伤害: 1.

      原文: Damage caused due to burns caused by fire

      Damage: 1

    • MELTING

      public static final EntityDamageEvent.DamageCause MELTING
      雪人由于融化受到的伤害.

      伤害: 1.

      原文: Damage caused due to a snowman melting

      Damage: 1

    • LAVA

      public static final EntityDamageEvent.DamageCause LAVA
      直接暴露在熔浆受到的伤害.

      伤害: 4.

      原文: Damage caused by direct exposure to lava

      Damage: 4

    • DROWNING

      public static final EntityDamageEvent.DamageCause DROWNING
      在水中耗尽空气受到的伤害.

      伤害: 2.

      原文: Damage caused by running out of air while in water

      Damage: 2

    • BLOCK_EXPLOSION

      public static final EntityDamageEvent.DamageCause BLOCK_EXPLOSION
      在爆炸范围内受到的伤害.

      伤害: 动态改变.

      原文: Damage caused by being in the area when a block explodes.

      Damage: variable

    • ENTITY_EXPLOSION

      public static final EntityDamageEvent.DamageCause ENTITY_EXPLOSION
      在实体爆炸范围内受到的伤害,例如苦力怕的爆炸.

      伤害: 动态改变.

      原文: Damage caused by being in the area when an entity, such as a Creeper, explodes.

      Damage: variable

    • VOID

      public static final EntityDamageEvent.DamageCause VOID
      掉入虚空受到的伤害.

      伤害: 每半秒4点.

      原文: Damage caused by falling into the void

      Damage: 4 for players

    • LIGHTNING

      public static final EntityDamageEvent.DamageCause LIGHTNING
      雷击造成的伤害.

      伤害: 5.

      原文: Damage caused by being struck by lightning

      Damage: 5

    • SUICIDE

      public static final EntityDamageEvent.DamageCause SUICIDE
      Damage caused by committing suicide.

      Note: This is currently only used by plugins, default commands like /minecraft:kill use VOID to damage players.

      Damage: variable

    • STARVATION

      public static final EntityDamageEvent.DamageCause STARVATION
      当饥饿值为空时受到的伤害.

      伤害: 1.

      原文: Damage caused by starving due to having an empty hunger bar

      Damage: 1

    • POISON

      public static final EntityDamageEvent.DamageCause POISON
      由于持续性毒药造成的伤害.

      伤害: 1.

      原文: Damage caused due to an ongoing poison effect

      Damage: 1

    • MAGIC

      public static final EntityDamageEvent.DamageCause MAGIC
      伤害药水或魔法造成的伤害.

      伤害: 动态改变.

      原文: Damage caused by being hit by a damage potion or spell

      Damage: variable

    • WITHER

      public static final EntityDamageEvent.DamageCause WITHER
      凋零效果造成的伤害.

      原文: Damage caused by Wither potion effect

    • FALLING_BLOCK

      public static final EntityDamageEvent.DamageCause FALLING_BLOCK
      被掉落中的方块砸中造成的伤害

      注意: 不是所有方块都会造成伤害.

      伤害: 动态改变.

      原文: Damage caused by being hit by a falling block which deals damage

      Note: Not every block deals damage

      Damage: variable

    • THORNS

      public static final EntityDamageEvent.DamageCause THORNS
      被荆棘反弹的攻击所造成的伤害(反伤).

      伤害: 1-4(荆棘).

      原文: Damage caused in retaliation to another attack by the Thorns enchantment.

      Damage: 1-4 (Thorns)

    • DRAGON_BREATH

      public static final EntityDamageEvent.DamageCause DRAGON_BREATH
      龙息造成的伤害 (恶龙咆哮~).

      伤害: 动态改变.

      原文: Damage caused by a dragon breathing fire.

      Damage: variable

    • CUSTOM

      public static final EntityDamageEvent.DamageCause CUSTOM
      自定义伤害.

      伤害: 动态改变.

      原文: Custom damage.

      Damage: variable

    • FLY_INTO_WALL

      public static final EntityDamageEvent.DamageCause FLY_INTO_WALL
      实体撞墙时造成的伤害.

      伤害: 动态改变.

      原文: Damage caused when an entity runs into a wall.

      Damage: variable

    • HOT_FLOOR

      public static final EntityDamageEvent.DamageCause HOT_FLOOR
      实体站在Material.MAGMA_BLOCK上时收到的伤害.

      伤害: 1.

      原文: Damage caused when an entity steps on Material.MAGMA_BLOCK.

      Damage: 1

    • CRAMMING

      public static final EntityDamageEvent.DamageCause CRAMMING
      由于游戏规则:maxEntityCramming,一个实体和许多其他实体挤压受到的伤害.

      伤害: 6.

      原文: Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.

      Damage: 6

    • DRYOUT

      public static final EntityDamageEvent.DamageCause DRYOUT
      实体(例如:鱼)不在水中时受到的伤害.

      伤害: 1.

      原文: Damage caused when an entity that should be in water is not.

      Damage: 1

    • FREEZE

      public static final EntityDamageEvent.DamageCause FREEZE
      冻伤引起的伤害.

      伤害: 1 或 5.

      原文: Damage caused from freezing.

      Damage: 1 or 5

    • SONIC_BOOM

      public static final EntityDamageEvent.DamageCause SONIC_BOOM
      来自Warden音波攻击造成的伤害.

      伤害: 10.

      原文: Damage caused by the Sonic Boom attack from Warden

      Damage: 10

  • 方法详细资料

    • values

      public static EntityDamageEvent.DamageCause[] values()
      按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
      返回:
      按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
    • valueOf

      public static EntityDamageEvent.DamageCause valueOf(String name)
      返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
      NullPointerException - 如果参数为空值