Package redempt.ordinate.command
Class CommandBase<T>
java.lang.Object
redempt.ordinate.command.CommandBase<T>
- Type Parameters:
T
- The sender type
- All Implemented Interfaces:
Named
Represents an executable command which can be registered
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionExecute a commandExecute a commandexecute
(T sender, SplittableList<Argument> args) Execute a commandgetCompletions
(T sender, String args) Calculate completions for a given inputgetCompletions
(T sender, String[] args) Calculate completions for a given inputgetCompletions
(T sender, SplittableList<Argument> args) Calculate completions for a given inputgetName()
getNames()
-
Constructor Details
-
CommandBase
-
-
Method Details
-
getHelpPage
- Returns:
- The help page for this command
-
getCommands
- Returns:
- The individual commands which might be executed when this command is run
-
getName
-
getNames
- Returns:
- All aliases of this command
-
getCompletions
Calculate completions for a given input- Parameters:
sender
- The sender of the commandargs
- The arguments, including partials- Returns:
- The completions
-
getCompletions
Calculate completions for a given input- Parameters:
sender
- The sender of the commandargs
- The arguments, including partials- Returns:
- The completions
-
getCompletions
Calculate completions for a given input- Parameters:
sender
- The sender of the commandargs
- The arguments, including partials- Returns:
- The completions
-
execute
Execute a command- Parameters:
sender
- The sender of the commandargs
- The arguments- Returns:
- The result of the command's execution
-
execute
Execute a command- Parameters:
sender
- The sender of the commandargs
- The arguments- Returns:
- The result of the command's execution
-
execute
Execute a command- Parameters:
sender
- The sender of the commandargs
- The arguments- Returns:
- The result of the command's execution
-