Package stawa.vitalstrike.commands
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 Summary
ConstructorsConstructorDescriptionCommandManager(VitalStrike plugin, VitalLogger logger, PlayerManager playerManager, PlayerStats playerStats, HelpManager helpManager, ResourcePackManager resourcePackManager) Constructs a new CommandManager. -
Method Summary
Modifier and TypeMethodDescriptionbooleanonCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args) Processes a command and routes it to the appropriate handler.onTabComplete(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) Handles tab completion for the plugin commands.
-
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 instancelogger- the loggerplayerManager- the player managerplayerStats- the player statshelpManager- the help managerresourcePackManager- 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:
onCommandin interfaceorg.bukkit.command.CommandExecutor- Parameters:
sender- the command sendercommand- the command being executedlabel- the command label usedargs- 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:
onTabCompletein interfaceorg.bukkit.command.TabCompleter- Parameters:
sender- the command sendercommand- the commandalias- the aliasargs- the arguments- Returns:
- the list of completions
-