类 EntityDamageByBlockEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityDamageEvent
org.bukkit.event.entity.EntityDamageByBlockEvent
- 所有已实现的接口:
Cancellable
当一个实体受到来自方块的伤害时触发该事件
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.entity.EntityDamageEvent
EntityDamageEvent.DamageCause, EntityDamageEvent.DamageModifier
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.entity.EntityEvent
entity
-
构造器概要
构造器说明EntityDamageByBlockEvent
(@Nullable Block damager, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, double damage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageByBlockEvent
(@Nullable Block 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 元素将从以后的版本中删除。EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull DamageSource damageSource, double damage) EntityDamageByBlockEvent
(@Nullable Block damager, @Nullable BlockState damagerState, @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) -
方法概要
修饰符和类型方法说明返回使玩家受到伤害的方块.Returns the captured BlockState of the block that damaged the player.从类继承的方法 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
-
构造器详细资料
-
EntityDamageByBlockEvent
@Deprecated(forRemoval=true) public EntityDamageByBlockEvent(@Nullable @Nullable Block damager, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, double damage) 已过时, 待删除: 此 API 元素将从以后的版本中删除。 -
EntityDamageByBlockEvent
public EntityDamageByBlockEvent(@Nullable @Nullable Block damager, @Nullable @Nullable BlockState damagerState, @NotNull @NotNull Entity damagee, @NotNull @NotNull EntityDamageEvent.DamageCause cause, @NotNull @NotNull DamageSource damageSource, double damage) -
EntityDamageByBlockEvent
@Deprecated(forRemoval=true) public EntityDamageByBlockEvent(@Nullable @Nullable Block 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 元素将从以后的版本中删除。 -
EntityDamageByBlockEvent
public EntityDamageByBlockEvent(@Nullable @Nullable Block damager, @Nullable @Nullable BlockState damagerState, @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
返回使玩家受到伤害的方块.原文:Returns the block that damaged the player.
- 返回:
- 使玩家受到伤害的方块
-
getDamagerBlockState
Returns the captured BlockState of the block that damaged the player.- 返回:
- the block state
-