Class CommandManager

java.lang.Object
stawa.vitalstrike.commands.CommandManager
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter

public class CommandManager extends Object implements org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter
Manages all commands for the VitalStrike plugin. This class handles command routing, tab completion, and permission checks.
  • Constructor Details

    • CommandManager

      public CommandManager(VitalStrike plugin, VitalLogger logger, PlayerManager playerManager, PlayerStats playerStats, HelpManager helpManager, ResourcePackManager resourcePackManager)
      Constructs a new CommandManager.
      Parameters:
      plugin - the VitalStrike plugin instance
      logger - the logger
      playerManager - the player manager
      playerStats - the player stats
      helpManager - the help manager
      resourcePackManager - the resource pack manager
  • Method Details

    • onCommand

      public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args)
      Processes a command and routes it to the appropriate handler.
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
      Parameters:
      sender - the command sender
      command - the command being executed
      label - the command label used
      args - the command arguments
      Returns:
      true if the command was handled successfully, false otherwise
    • onTabComplete

      public List<String> onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args)
      Handles tab completion for the plugin commands.
      Specified by:
      onTabComplete in interface org.bukkit.command.TabCompleter
      Parameters:
      sender - the command sender
      command - the command
      alias - the alias
      args - the arguments
      Returns:
      the list of completions