WhitelistAddPlayerEvent

This class represents a Whitelist+ event triggered when a player is added to the whitelist. It can be used by plugin developers to intercept or react to whitelist modifications.

Constructor

public WhitelistAddPlayerEvent(String playerName, Player triggeredBy, WhitelistSource source)

Creates a new instance of the event.

  • playerName - The name of the player being added.

  • triggeredBy - The player who triggered the event (can be null).

  • source - The source of the action (API, CONSOLE, PLAYER).

Methods

String getPlayerName()

Returns the name of the player being added to the whitelist.

OfflinePlayer getPlayer()

Returns an OfflinePlayer object representing the player.

Player getTriggeredBy()

Returns the player who triggered the whitelist addition, if any.

WhitelistSource getSource()

Returns the source of the whitelist action (e.g., plugin, console, GUI).

boolean isCancelled()

Checks whether the event has been cancelled.

void setCancelled(boolean cancel)

Sets the cancelled status of the event.

HandlerList getHandlers()

Standard method required by Bukkit's event system.

static HandlerList getHandlerList()

Returns the handler list for this event class.

Last updated