Package io.manebot.command
Class CommandManager.Registration
- java.lang.Object
-
- io.manebot.command.CommandManager.Registration
-
- Enclosing class:
- CommandManager
public class CommandManager.Registration extends java.lang.Object
Command Registrations are a fluent way of aliasing commands.
-
-
Constructor Summary
Constructors Constructor Description Registration(CommandExecutor executor, java.lang.String label)
-
Method Summary
Modifier and Type Method Description CommandManager.Registration
alias(java.lang.String alias)
Creates an alias of the command described by this registration.CommandExecutor
getExecutor()
CommandExecutor instance mapped to this Registration.java.lang.String
getLabel()
Gets the command label bound with this registration.
-
-
-
Constructor Detail
-
Registration
public Registration(CommandExecutor executor, java.lang.String label)
-
-
Method Detail
-
getExecutor
public CommandExecutor getExecutor()
CommandExecutor instance mapped to this Registration.- Returns:
- CommandExecutor instance.
-
getLabel
public java.lang.String getLabel()
Gets the command label bound with this registration.- Returns:
- label.
-
alias
public CommandManager.Registration alias(java.lang.String alias)
Creates an alias of the command described by this registration.- Parameters:
alias
- label alias to map.- Returns:
- Registration instance.
-
-