Class CommandTree<S>
java.lang.Object
io.github.mqzn.commands.base.tree.CommandTree<S>
- Type Parameters:
S
- the sender type
This class represents a tree data structure
containing all nodes of subcommands of a
particular command.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> CommandTree<S>
Constructs a new CommandTree instance using the command specified for the treegetParentalArguments
(String subCmdName) @Nullable SubCommandSyntax<S>
getSubCommand
(String name) traverse
(@NotNull DelegateCommandContext<S> context) Searches through the subcommands for appropriate subcommand that was used in the context
-
Method Details
-
create
Constructs a new CommandTree instance using the command specified for the tree- Type Parameters:
S
- the sender type- Parameters:
command
- the command that will hold this tree- Returns:
- the command tree instance
-
traverse
Searches through the subcommands for appropriate subcommand that was used in the context- Parameters:
context
- the command context determined by the sender- Returns:
- the subcommand to execute
-
getSubCommand
-
getParentalArguments
-