Package cn.lunadeer.dominion.events
Class ResultEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
- Direct Known Subclasses:
DominionCreateEvent
,DominionDeleteEvent
,DominionModifyEvent
,GroupAddMemberEvent
,GroupCreateEvent
,GroupDeleteEvent
,GroupRemoveMemberEvent
,GroupRenamedEvent
,MemberAddedEvent
,MemberRemovedEvent
Represents an event that can be cancelled and involves a command sender.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorsConstructorDescriptionResultEvent
(org.bukkit.command.CommandSender operator) Constructs a new ResultEvent. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.command.CommandSender
Gets the command sender who initiated the event.boolean
Checks if the event is cancelled.void
setCancelled
(boolean b) Sets the cancellation state of the event.Methods inherited from class cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
ResultEvent
public ResultEvent(org.bukkit.command.CommandSender operator) Constructs a new ResultEvent.- Parameters:
operator
- the command sender who initiated the event
-
-
Method Details
-
getOperator
public org.bukkit.command.CommandSender getOperator()Gets the command sender who initiated the event.- Returns:
- the command sender
-
isCancelled
public boolean isCancelled()Checks if the event is cancelled.- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- true if the event is cancelled, false otherwise
-
setCancelled
public void setCancelled(boolean b) Sets the cancellation state of the event.- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
b
- true to cancel the event, false to uncancel
-