Class PRerollCommand

All Implemented Interfaces:
PlayerCommand, PlayerCommandCompleter

public class PRerollCommand extends PlayerCommandBase
  • Constructor Details

    • PRerollCommand

      public PRerollCommand()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: PlayerCommand
      Gets the name of the command. This is used as the subcommand identifier (e.g., /command <name>).
      Returns:
      the subcommand name
    • getPermission

      public String getPermission()
      Description copied from interface: PlayerCommand
      Gets the required permission to execute the command.
      Returns:
      the permission node as a string
    • execute

      public void execute(org.bukkit.entity.Player player, String[] args)
      Description copied from interface: PlayerCommand
      Executes the command logic when the command is invoked by a player.
      Parameters:
      player - the player executing the command
      args - the arguments passed to the command
    • invalidQuest

      protected void invalidQuest(org.bukkit.entity.Player player)
      Sends the invalid quest message to the sender.
    • onTabComplete

      public List<String> onTabComplete(@NotNull org.bukkit.command.CommandSender sender, String[] args)
      Description copied from class: PlayerCommandBase
      Provides tab-completion suggestions for the command.

      This method is called automatically by Bukkit when the user presses the TAB key while typing the command. By default, this implementation returns an empty list, which disables tab-completion.

      To enable suggestions, override this method in your command class and return a list of possible completions. Returning null allows Bukkit to auto-complete player names.

      Specified by:
      onTabComplete in interface PlayerCommandCompleter
      Overrides:
      onTabComplete in class PlayerCommandBase
      Parameters:
      sender - the source of the command (player or console)
      args - the current command arguments
      Returns:
      a list of completions, an empty list to disable suggestions, or null to let Bukkit suggest player names