Class SentinelChaseNewTargetEvent

java.lang.Object
org.bukkit.event.Event
net.citizensnpcs.api.event.CitizensEvent
net.citizensnpcs.api.event.NPCEvent
org.mcmonkey.sentinel.events.SentinelChaseNewTargetEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class SentinelChaseNewTargetEvent extends net.citizensnpcs.api.event.NPCEvent implements org.bukkit.event.Cancellable
Event fired when a Sentinel NPC is setting its current chase target to something new.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Whether the event is cancelled.
    org.bukkit.entity.LivingEntity
    The new chase target.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SentinelChaseNewTargetEvent(net.citizensnpcs.api.npc.NPC npc, org.bukkit.entity.LivingEntity target)
    Constructs the chase-new-target event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Returns the handler list for use with Bukkit.
    org.bukkit.event.HandlerList
    Returns the handler list for use with Bukkit.
    boolean
    Returns whether the event is cancelled.
    void
    setCancelled(boolean b)
    Sets whether the event is cancelled.

    Methods inherited from class net.citizensnpcs.api.event.NPCEvent

    getNPC

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • newTarget

      public org.bukkit.entity.LivingEntity newTarget
      The new chase target. Can be modified if desired. Prefer "setCancelled" if you just want to cancel the change.
    • cancelled

      public boolean cancelled
      Whether the event is cancelled.
  • Constructor Details

    • SentinelChaseNewTargetEvent

      public SentinelChaseNewTargetEvent(net.citizensnpcs.api.npc.NPC npc, org.bukkit.entity.LivingEntity target)
      Constructs the chase-new-target event.
  • Method Details

    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Returns the handler list for use with Bukkit.
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Returns the handler list for use with Bukkit.
    • isCancelled

      public boolean isCancelled()
      Returns whether the event is cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean b)
      Sets whether the event is cancelled.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable