public class EntityTargetLivingEntityEvent extends EntityTargetEvent
LivingEntity and can only target
LivingEntity's.EntityTargetEvent.TargetReasonEvent.Resultentity| 构造器和说明 |
|---|
EntityTargetLivingEntityEvent(Entity entity,
LivingEntity target,
EntityTargetEvent.TargetReason reason) |
| 限定符和类型 | 方法和说明 |
|---|---|
LivingEntity |
getTarget()
Get the entity that this is targeting.
|
void |
setTarget(Entity target)
Set the Entity that you want the mob to target.
|
getHandlerList, getHandlers, getReason, isCancelled, setCancelledgetEntity, getEntityTypegetEventName, isAsynchronouspublic EntityTargetLivingEntityEvent(Entity entity, LivingEntity target, EntityTargetEvent.TargetReason reason)
public LivingEntity getTarget()
EntityTargetEventThis will be null in the case that the event is called when the mob forgets its target.
getTarget 在类中 EntityTargetEventpublic void setTarget(Entity target)
It is possible to be null, null will cause the entity to be target-less.
Must be a LivingEntity, or null.
setTarget 在类中 EntityTargetEventtarget - The entity to target