Class CommandTree<S>
java.lang.Object
io.github.mqzn.commands.base.syntax.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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A class that defines a subcommand node, each node has a reference to its children nodes, the children can be more than one, that's why a set is being usedstatic class
static enum
static final record
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> CommandTree<S>
static <S> String
getLastRawArgument
(DelegateCommandContext<S> context) LinkedList<Argument<?>>
getRoots()
searchForSub
(String name) traverse
(DelegateCommandContext<S> context) Searches through the subcommands for appropriate subcommand that was used in the context
-
Method Details
-
create
-
getLastRawArgument
-
getRoots
-
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
-
searchForSub
-