枚举的使用
org.bukkit.event.entity.EntityTargetEvent.TargetReason
-
org.bukkit.event.entity中EntityTargetEvent.TargetReason的使用
修饰符和类型方法说明EntityTargetEvent.getReason()
Returns the reason for the targeting返回带有指定名称的该类型的枚举常量。static EntityTargetEvent.TargetReason[]
EntityTargetEvent.TargetReason.values()
按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。限定符构造器说明EntityTargetEvent
(@NotNull Entity entity, @Nullable Entity target, @NotNull EntityTargetEvent.TargetReason reason) EntityTargetLivingEntityEvent
(@NotNull Entity entity, @Nullable LivingEntity target, @Nullable EntityTargetEvent.TargetReason reason)