类 EntityTargetLivingEntityEvent

所有已实现的接口:
Cancellable

public class EntityTargetLivingEntityEvent extends EntityTargetEvent
Called when an Entity targets a LivingEntity and can only target LivingEntity's.
  • 构造器详细资料

  • 方法详细资料

    • getTarget

      public LivingEntity getTarget()
      从类复制的说明: EntityTargetEvent
      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
      返回:
      The entity
    • setTarget

      public void setTarget(Entity target)
      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 - The entity to target