类 EntityTargetLivingEntityEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTargetEvent
org.bukkit.event.entity.EntityTargetLivingEntityEvent
- 所有已实现的接口:
Cancellable
当实体 targeting 一个
LivingEntity 且只能 targeting 生物实体时调用。-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.entity.EntityTargetEvent
EntityTargetEvent.TargetReason从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result -
字段概要
从类继承的字段 org.bukkit.event.entity.EntityEvent
entity -
构造器概要
构造器构造器说明EntityTargetLivingEntityEvent(@NotNull Entity entity, @Nullable LivingEntity target, @Nullable EntityTargetEvent.TargetReason reason) -
方法概要
从类继承的方法 org.bukkit.event.entity.EntityTargetEvent
getHandlerList, getHandlers, getReason, isCancelled, setCancelled从类继承的方法 org.bukkit.event.entity.EntityEvent
getEntity, getEntityType从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
EntityTargetLivingEntityEvent
public EntityTargetLivingEntityEvent(@NotNull @NotNull Entity entity, @Nullable @Nullable LivingEntity target, @Nullable @Nullable EntityTargetEvent.TargetReason reason)
-
-
方法详细资料
-
getTarget
从类复制的说明:EntityTargetEvent获取此实体正在 targeting 的实体。在事件因生物忘记其目标而被调用时,此值将为 null。
原文: Get the entity that this is targeting.
This will be null in the case that the event is called when the mob forgets its target.
- 覆盖:
getTarget在类中EntityTargetEvent- 返回:
- 实体
-
setTarget
设置你希望生物 targeting 的实体。可以设置为 null,null 会导致实体没有目标。
必须是 LivingEntity 或 null。
原文: Set the Entity that you want the mob to target.
It is possible to be null, null will cause the entity to be target-less.
Must be a LivingEntity, or null.
- 覆盖:
setTarget在类中EntityTargetEvent- 参数:
target- 要 targeting 的实体
-