Player Flag Set Event
Primary constructor for creating a PlayerFlagSetEvent when the player is online.
This constructor should be used when you have direct access to the Player object, typically when the player is currently connected to the server. The player's UUID will be automatically extracted from the Player object.
Since
1.0.0
Parameters
The online Player object whose flag is being modified
The name/identifier of the flag being modified
The previous value of the flag (null if flag didn't exist)
The new value being set for the flag (null if removing flag)
See also
(UUID, String, String?, String?) for offline player constructor
Alternative constructor for creating a PlayerFlagSetEvent when only the player's UUID is available.
This constructor should be used when you need to modify a flag for a player who might be offline, or when you only have access to their UUID rather than the full Player object. This is common in scenarios such as:
Processing data from databases or configuration files
Handling delayed operations that might execute after a player logs off
Administrative commands that modify offline player data
Since
1.0.0
Parameters
The unique identifier of the player whose flag is being modified
The name/identifier of the flag being modified
The previous value of the flag (null if flag didn't exist)
The new value being set for the flag (null if removing flag)
See also
(Player, String, String?, String?) for online player constructor