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
ConstructorsConstructorDescriptionNpcCreateEvent(@NotNull Npc npc, @NotNull org.bukkit.command.CommandSender creator) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.command.CommandSenderstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerList@NotNull NpcgetNpc()booleanvoidsetCancelled(boolean cancel) Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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
- 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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-