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