Package valorless.rarespawns.commands
Class CommandOptOut
java.lang.Object
valorless.rarespawns.commands.CommandOptOut
Command handler for toggling a player's RareSpawns opt-out status.
When executed by a player, this command flips their opt-out flag in the PlayerOptOut database and informs them with a localized message prefixed by the plugin's prefix.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommandOptOut
public CommandOptOut()
-
-
Method Details
-
Run
Executes the opt-out toggle for the invoking sender if it is a Player.Behavior:
- If the sender is not a Player, returns false without action.
- Toggles the player's opt-out state via
PlayerOptOut.toggleOptOut(Player). - Sends a feedback message using
Langwith the plugin prefix.
- Parameters:
command- the wrapped command context containing the sender- Returns:
- true if the command executed successfully; false otherwise
-