程序包 org.bukkit.event.entity

# 类 EntityDamageByEntityEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDamageEvent
org.bukkit.event.entity.EntityDamageByEntityEvent

所有已实现的接口:
  `Cancellable`

public class EntityDamageByEntityEvent extends EntityDamageEvent
当一个实体受到另外一个实体伤害时触发该事件

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 org.bukkit.event.entity.EntityDamageEvent

  `EntityDamageEvent.DamageCause, EntityDamageEvent.DamageModifier`

  ## 从类继承的嵌套类/接口 org.bukkit.event.Event

  `Event.Result`

- ## 字段概要

  ### 从类继承的字段 org.bukkit.event.entity.EntityEvent

  `entity`

- ## 构造器概要

  构造器
  构造器
  说明
  `EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage)`
  已过时, 待删除: 此 API 元素将从以后的版本中删除。
  `EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier,Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier,? extends Function<? super Double,Double>> modifierFunctions)`
  已过时, 待删除: 此 API 元素将从以后的版本中删除。
  `EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage)`
  `EntityDamageByEntityEvent(@NotNull Entity damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, @NotNull Map<EntityDamageEvent.DamageModifier,Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier,? extends Function<? super Double,Double>> modifierFunctions)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@NotNull Entity`
  `getDamager()`
  返回造成这次伤害的实体

  ### 从类继承的方法 org.bukkit.event.entity.EntityDamageEvent

  `getCause, getDamage, getDamage, getDamageSource, getFinalDamage, getHandlerList, getHandlers, getOriginalDamage, isApplicable, isCancelled, setCancelled, setDamage, setDamage`

  ### 从类继承的方法 org.bukkit.event.entity.EntityEvent

  `getEntity, getEntityType`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### EntityDamageByEntityEvent

    @Deprecated(forRemoval=true) public EntityDamageByEntityEvent(@NotNull @NotNull Entity damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, double damage)
    已过时, 待删除: 此 API 元素将从以后的版本中删除。

  - ### EntityDamageByEntityEvent

    public EntityDamageByEntityEvent(@NotNull @NotNull Entity damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, @NotNull @NotNull DamageSource damageSource, double damage)

  - ### EntityDamageByEntityEvent

    @Deprecated(forRemoval=true) public EntityDamageByEntityEvent(@NotNull @NotNull Entity damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,Double> modifiers, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,? extends Function<? super Double,Double>> modifierFunctions)
    已过时, 待删除: 此 API 元素将从以后的版本中删除。

  - ### EntityDamageByEntityEvent

    public EntityDamageByEntityEvent(@NotNull @NotNull Entity damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, @NotNull @NotNull DamageSource damageSource, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,Double> modifiers, @NotNull @NotNull Map<EntityDamageEvent.DamageModifier,? extends Function<? super Double,Double>> modifierFunctions)

- ## 方法详细资料

  - ### getDamager

    @NotNull public @NotNull Entity getDamager()
    返回造成这次伤害的实体

    原文: Returns the entity that damaged the defender.

    返回:
      造成这次伤害的实体