Class CommandOptOut

java.lang.Object
valorless.rarespawns.commands.CommandOptOut

public class CommandOptOut extends Object
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 Details

    • CommandOptOut

      public CommandOptOut()
  • Method Details

    • Run

      public static boolean Run(RSCommand command)
      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 Lang with the plugin prefix.

      Parameters:
      command - the wrapped command context containing the sender
      Returns:
      true if the command executed successfully; false otherwise