枚举的使用
org.bukkit.event.entity.EntityDamageEvent.DamageModifier
-
org.bukkit.event.entity中EntityDamageEvent.DamageModifier的使用
修饰符和类型方法说明已过时。返回带有指定名称的该类型的枚举常量。static EntityDamageEvent.DamageModifier[]
EntityDamageEvent.DamageModifier.values()
已过时。按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。修饰符和类型方法说明double
EntityDamageEvent.getDamage
(@NotNull EntityDamageEvent.DamageModifier type) 通过特定修饰符返回伤害值.double
EntityDamageEvent.getOriginalDamage
(@NotNull EntityDamageEvent.DamageModifier type) 获取指定伤害类型的原始伤害,作为本次事件的结构定义 .boolean
EntityDamageEvent.isApplicable
(@NotNull EntityDamageEvent.DamageModifier type) 该方法将检查特定的伤害原因是否是本次触发的原因, 例如EntityDamageEvent.setDamage(DamageModifier, double)
将不会抛出UnsupportedOperationException
异常void
EntityDamageEvent.setDamage
(@NotNull EntityDamageEvent.DamageModifier type, double damage) 设置指定伤害类型的伤害.限定符构造器说明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, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 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, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) EntityDamageEvent
(@NotNull Entity damagee, @NotNull EntityDamageEvent.DamageCause cause, @NotNull Map<EntityDamageEvent.DamageModifier, Double> modifiers, @NotNull Map<EntityDamageEvent.DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) 已过时, 待删除: 此 API 元素将从以后的版本中删除。EntityDamageEvent
(@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)