程序包 org.bukkit.event.entity

# 类 EntityTargetLivingEntityEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTargetEvent
org.bukkit.event.entity.EntityTargetLivingEntityEvent

所有已实现的接口:
  `Cancellable`

public class EntityTargetLivingEntityEvent extends EntityTargetEvent
Called when an Entity targets a `LivingEntity` and can only target LivingEntity's.

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 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)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `@Nullable LivingEntity`
  `getTarget()`
  Get the entity that this is targeting.
  `void`
  `setTarget(@Nullable Entity target)`
  Set the Entity that you want the mob to target.

  ### 从类继承的方法 org.bukkit.event.entity.EntityTargetEvent

  `getHandlerList, getHandlers, getReason, isCancelled, setCancelled`

  ### 从类继承的方法 org.bukkit.event.entity.EntityEvent

  `getEntity, getEntityType`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### EntityTargetLivingEntityEvent

    public EntityTargetLivingEntityEvent(@NotNull @NotNull Entity entity, @Nullable @Nullable LivingEntity target, @Nullable @Nullable EntityTargetEvent.TargetReason reason)

- ## 方法详细资料

  - ### getTarget

    @Nullable public @Nullable 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(@Nullable @Nullable 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