on Command
Main command execution handler for the /core command.
This method processes all incoming command executions and routes them to the appropriate subcommand handlers based on the first argument provided. If no arguments are provided, it displays the help message.
Command Flow:
Validates that arguments are provided (shows help if empty)
Normalizes the subcommand to lowercase for case-insensitive matching
Routes to appropriate handler based on subcommand
Returns appropriate success/failure status
Supported Subcommands:
info- Shows plugin and server informationreload- Reloads plugin configuration (permission required)testplugin- Runs system diagnostics (permission required, player-only)
Return
true if the command was handled successfully, false if there was an error or if the command usage should be displayed to the sender
Parameters
The CommandSender who executed the command (can be player or console)
The Command object representing the executed command
The actual command label used (could be an alias)
Array of command arguments provided by the sender