Package net.citizensnpcs.api.event
Class CommandSenderCreateNPCEvent
java.lang.Object
org.bukkit.event.Event
net.citizensnpcs.api.event.CitizensEvent
net.citizensnpcs.api.event.NPCEvent
net.citizensnpcs.api.event.NPCCreateEvent
net.citizensnpcs.api.event.CommandSenderCreateNPCEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
CommandSenderCloneNPCEvent
,PlayerCreateNPCEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
boolean
void
setCancelled
(boolean cancel) void
setCancelReason
(String reason) Sets the reason for cancelling the event.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
CommandSenderCreateNPCEvent
-
-
Method Details
-
getCancelReason
- Returns:
- The reason for cancelling the event
- See Also:
-
getCreator
- Returns:
- The
CommandSender
creating the NPC.
-
getHandlers
- Overrides:
getHandlers
in classNPCCreateEvent
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceCancellable
-
setCancelReason
Sets the reason for cancelling the event. This will be sent to theCommandSender
creator to explain why the NPC cannot be created.- Parameters:
reason
- The reason explaining the cancellation
-
getHandlerList
-