Class RSCommand

java.lang.Object
valorless.rarespawns.commands.RSCommand

public class RSCommand extends Object
Lightweight wrapper for a command invocation's context.

Bundles together the sender, the Bukkit Command instance, the label used, and the raw arguments array to simplify passing data between command handlers.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String[]
    The raw arguments following the command label.
    final org.bukkit.command.Command
    The Bukkit command object being executed.
    final String
    The alias/label used to invoke the command.
    final org.bukkit.command.CommandSender
    The source issuing the command (player, console, etc.).
  • Constructor Summary

    Constructors
    Constructor
    Description
    RSCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
    Constructs a new command context wrapper.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • sender

      public final org.bukkit.command.CommandSender sender
      The source issuing the command (player, console, etc.).
    • command

      public final org.bukkit.command.Command command
      The Bukkit command object being executed.
    • label

      public final String label
      The alias/label used to invoke the command.
    • args

      public final String[] args
      The raw arguments following the command label.
  • Constructor Details

    • RSCommand

      public RSCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
      Constructs a new command context wrapper.
      Parameters:
      sender - the entity that issued the command
      command - the Bukkit Command being executed
      label - the alias used to invoke the command
      args - the raw argument array