Package net.ess3.api.events
Class StateChangeEvent
java.lang.Object
org.bukkit.event.Event
net.ess3.api.events.StateChangeEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
NickChangeEvent
,StatusChangeEvent
This handles common boilerplate for events for changes in state.
For boolean state, events should extend StatusChangeEvent instead.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionStateChangeEvent
(boolean isAsync, IUser affected, IUser controller) StateChangeEvent
(IUser affected, IUser controller) -
Method Summary
Modifier and TypeMethodDescriptionGet the user who is affected by the state change.Get the user who caused the state change.boolean
void
setCancelled
(boolean cancelled) Methods inherited from class org.bukkit.event.Event
getEventName, getHandlers, isAsynchronous
-
Constructor Details
-
StateChangeEvent
-
StateChangeEvent
-
-
Method Details
-
getAffected
Get the user who is affected by the state change.- Returns:
- The user who is affected by the state change.
-
getController
Get the user who caused the state change.- Returns:
- The user who caused the state change.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceCancellable
-