PlayerFlagSetEvent

class PlayerFlagSetEvent : Event

Custom Bukkit event that is fired when a player's flag is set or modified within the McMMO core system.

This event represents a change in a player's flag state, providing both the old and new values for comparison and tracking purposes. Flags are typically used to store player-specific configuration, state information, or temporary data that needs to be tracked across the plugin's lifecycle.

The event can be constructed in two ways:

  1. With a Player object (when the player is online)

  2. With just a UUID (when the player might be offline)

This dual construction approach allows for flag modifications both for online and offline players, providing flexibility in how the plugin manages player data.

Since

1.0.0

Author

McMMO Core Team

Constructors

Link copied to clipboard
constructor(player: Player, flagName: String, oldValue: String?, newValue: String?)

Primary constructor for creating a PlayerFlagSetEvent when the player is online.

constructor(playerUUID: UUID, flagName: String, oldValue: String?, newValue: String?)

Alternative constructor for creating a PlayerFlagSetEvent when only the player's UUID is available.

Types

Link copied to clipboard
object Companion

Companion object containing static members for the PlayerFlagSetEvent class.

Properties

Link copied to clipboard

The name/identifier of the flag that is being modified.

Link copied to clipboard

The new value being assigned to the flag.

Link copied to clipboard

The previous value of the flag before this modification occurred.

Link copied to clipboard
val player: Player?

The Player object representing the player whose flag is being modified.

Link copied to clipboard

The unique identifier (UUID) of the player whose flag is being modified.

Functions

Link copied to clipboard
open fun callEvent(): Boolean
Link copied to clipboard
@NotNull
open fun getEventName(): @NotNull String
Link copied to clipboard
open override fun getHandlers(): HandlerList

Returns the HandlerList for this event type.

Link copied to clipboard