Interface SetAITargetEvent

All Superinterfaces:
Cancellable, Event

public interface SetAITargetEvent extends Event, Cancellable
Fires before the target of an Agent is set.
  • Method Details

    • agent

      Agent agent()
      Gets the Agent.
      Returns:
      The agent
    • target

      Optional<Entity> target()
      Gets the Agents new target Entity.
      Returns:
      The target
    • setTarget

      void setTarget(@Nullable Entity target)
      Sets the Agents new target Entity.

      This target is set after the event when it is not cancelled.

      Setting a null target removes the target.

      Parameters:
      target - The target