WhitelistToggleEvent
This class represents a Whitelist+ event triggered when the whitelist is toggled on or off. It is cancellable, allowing plugins to prevent the change in whitelist state.
Constructor
public WhitelistToggleEvent(boolean newState, Player triggeredBy, WhitelistSource source)
newState - The new state of the whitelist (true if enabled, false if disabled).
triggeredBy - The player who initiated the toggle (can be null).
source - The source of the toggle action (API, PLAYER, CONSOLE).
Methods
boolean getNewState()
boolean getNewState()
Returns the new state of the whitelist.
boolean isEnabling()
boolean isEnabling()
Returns true if the whitelist is being enabled.
boolean isDisabling()
boolean isDisabling()
Returns true if the whitelist is being disabled.
Player getTriggeredBy()
Player getTriggeredBy()
Returns the player who triggered the toggle, or null if not applicable.
WhitelistSource getSource()
WhitelistSource getSource()
Returns the source of the toggle action.
boolean isCancelled()
boolean isCancelled()
Checks whether the event has been cancelled.
void setCancelled(boolean cancel)
void setCancelled(boolean cancel)
Sets whether the event should be cancelled.
HandlerList getHandlers()
HandlerList getHandlers()
Standard Bukkit method to retrieve handlers for this event.
static HandlerList getHandlerList()
static HandlerList getHandlerList()
Returns the static handler list for this event class.
Last updated