Interface SetAITargetEvent

    • Method Detail

      • agent

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

        java.util.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