Class NpcCreateEvent

java.lang.Object
org.bukkit.event.Event
de.oliver.fancynpcs.api.events.NpcCreateEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class NpcCreateEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Is fired when a new NPC is being created
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    NpcCreateEvent(@NotNull Npc npc, @NotNull org.bukkit.command.CommandSender creator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.command.CommandSender
     
    static org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    @NotNull Npc
     
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class Object

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

    • NpcCreateEvent

      public NpcCreateEvent(@NotNull @NotNull Npc npc, @NotNull @NotNull org.bukkit.command.CommandSender creator)
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • getNpc

      @NotNull public @NotNull Npc getNpc()
      Returns:
      the created npc
    • getCreator

      @NotNull public @NotNull org.bukkit.command.CommandSender getCreator()
      Returns:
      the player who created the npc
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event