Class NPCSpawnEvent

All Implemented Interfaces:
Cancellable

public class NPCSpawnEvent extends NPCEvent implements Cancellable
Called when an NPC spawns.
  • Constructor Details

  • Method Details

    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getLocation

      public Location getLocation()
      Gets the location where the NPC was spawned.
      Returns:
      Location where the NPC was spawned
    • getReason

      public SpawnReason getReason()
      Gets the reason for spawning the NPC.
      Returns:
      Reason for spawning the NPC
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlerList

      public static HandlerList getHandlerList()