Interface CommandTreeNode<T extends CommandTreeNode<T>>
- 
- All Known Subinterfaces:
- CommandTreeNode.Amount,- CommandTreeNode.Argument<T>,- CommandTreeNode.Basic,- CommandTreeNode.EntitySelection,- CommandTreeNode.Range<S>,- CommandTreeNode.Root,- CommandTreeNode.StringParser
 
 public interface CommandTreeNode<T extends CommandTreeNode<T>>Builds a tree of command parameters for sending to clients. For use with customCommandRegistrars andCommand.Raw.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceCommandTreeNode.AmountACommandTreeNodethat controls whether multiple entries can be parsed.static interfaceCommandTreeNode.Argument<T extends CommandTreeNode<T>>ACommandTreeNodethat can be used as a child.static interfaceCommandTreeNode.BasicACommandTreeNodewith no known properties to set.static interfaceCommandTreeNode.EntitySelectionACommandTreeNodethat augments entity based parameters.static interfaceCommandTreeNode.NodeFactoryFactory to create a root node.static interfaceCommandTreeNode.Range<S extends java.lang.Number>ACommandTreeNodethat allows for a min-max range to be set.static interfaceCommandTreeNode.RootACommandTreeNodethat acts as the root of a command.static interfaceCommandTreeNode.StringParserACommandTreeNodethat allows for the setting of how a string based parser will behave.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Tchild(java.lang.String key, CommandTreeNode.Argument<?> childNode)Creates a child of this node with the given key that accepts a non-literal argument.default <C extends CommandTreeNode.Argument<C>>
 Tchild(java.lang.String key, CommandTreeNodeType<C> type, java.util.function.Consumer<C> processor)Creates a child of this node with the given key that accepts a non-literal argument.default <C extends CommandTreeNode.Argument<C>>
 Tchild(java.lang.String key, DefaultedRegistryReference<CommandTreeNodeType<C>> type, java.util.function.Consumer<C> processor)Creates a child of this node with the given key that accepts a non-literal argument.Tcompletions(@Nullable CommandCompletionProvider completionProvider)Declares that the node should use the providedCommandCompletionProviderfor generating completions on the client.default Tcompletions(@Nullable DefaultedRegistryReference<CommandCompletionProvider> completionProvider)Declares that the node should use the providedCommandCompletionProviderfor generating completions on the client.TcustomCompletions()Declares that this node uses custom completions and, as such, tab completions should query the server.Texecutable()Declares that the node thisCommandTreeNoderepresents is executable, meaning that a command string that stops here is considered complete.static CommandTreeNode<CommandTreeNode.Basic>literal()Creates a node that uses its key as a literal.Tredirect(CommandTreeNode<?> redirectTarget)Declares that this element will redirect processing to the given node in this tree after this node has been processed.Trequires(@Nullable java.util.function.Predicate<CommandCause> requirement)Declares that this element can only be parsed by those with the given requirement.static CommandTreeNode<CommandTreeNode.Root>root()Creates a root node for the tree.
 
- 
- 
- 
Method Detail- 
rootstatic CommandTreeNode<CommandTreeNode.Root> root() Creates a root node for the tree.The return value is in an 'intermediate' state, where it must have additional information supplied to become a useful part of the command tree. The node should be at least one of executable()ortaking an argument, and may have other attributes applied.- Returns:
- The root node.
 
 - 
literalstatic CommandTreeNode<CommandTreeNode.Basic> literal() Creates a node that uses its key as a literal.The return value is in an 'intermediate' state, where it must have additional information supplied to become a useful part of the command tree. The node should be at least one of executable()ortaking an argument, and may have other attributes applied.- Returns:
- The literal.
 
 - 
childT child(java.lang.String key, CommandTreeNode.Argument<?> childNode) Creates a child of this node with the given key that accepts a non-literal argument.The builder returned by this method is the same builder as that invoked on. The child builder is provided in the childNodenode.- Parameters:
- key- The name of the child node
- childNode- The child node
- Returns:
- This, for chaining.
- See Also:
- for the node types that can be created
 
 - 
childdefault <C extends CommandTreeNode.Argument<C>> T child(java.lang.String key, DefaultedRegistryReference<CommandTreeNodeType<C>> type, java.util.function.Consumer<C> processor) Creates a child of this node with the given key that accepts a non-literal argument.The builder returned by this method is the same builder as that invoked on. The child builder is provided in the childNodenode.This variant will create a new node based on the provided key and allow for processing before adding the node as a child - Type Parameters:
- C- The type of- CommandTreeNode.Argumentto be created
- Parameters:
- key- The name of the child node
- type- the type of argument to use in the child node
- processor- A callback that will receive the created child node
- Returns:
- This, for chaining.
- See Also:
- for the node types that can be created
 
 - 
childdefault <C extends CommandTreeNode.Argument<C>> T child(java.lang.String key, CommandTreeNodeType<C> type, java.util.function.Consumer<C> processor) Creates a child of this node with the given key that accepts a non-literal argument.The builder returned by this method is the same builder as that invoked on. The child builder is provided in the childNodenode.This variant will create a new node based on the provided key and allow for processing before adding the node as a child - Type Parameters:
- C- The type of- CommandTreeNode.Argumentto be created
- Parameters:
- key- The name of the child node
- type- the type of argument to use in the child node
- processor- A callback that will receive the created child node
- Returns:
- This, for chaining.
- See Also:
- for the node types that can be created
 
 - 
redirectT redirect(CommandTreeNode<?> redirectTarget) Declares that this element will redirect processing to the given node in this tree after this node has been processed.The node that is provided here will not be executed and will not be checked to see if its requirements are met. This node will act as if its has the target node's children. - Parameters:
- redirectTarget- The node to redirect to
- Returns:
- This, for chaining
 
 - 
requiresT requires(@Nullable java.util.function.Predicate<CommandCause> requirement) Declares that this element can only be parsed by those with the given requirement.- Parameters:
- requirement- The requirement
- Returns:
- This, for chaining
 
 - 
executableT executable() Declares that the node thisCommandTreeNoderepresents is executable, meaning that a command string that stops here is considered complete.- Returns:
- This, for chaining
 
 - 
completionsdefault T completions(@Nullable DefaultedRegistryReference<CommandCompletionProvider> completionProvider) Declares that the node should use the providedCommandCompletionProviderfor generating completions on the client.This overrides customCompletions().- Parameters:
- completionProvider- The provider this node should use
- Returns:
- This, for chaining
 
 - 
completionsT completions(@Nullable CommandCompletionProvider completionProvider) Declares that the node should use the providedCommandCompletionProviderfor generating completions on the client.This overrides customCompletions().- Parameters:
- completionProvider- The provider this node should use
- Returns:
- This, for chaining
 
 - 
customCompletionsT customCompletions() Declares that this node uses custom completions and, as such, tab completions should query the server.This overrides completions(CommandCompletionProvider).- Returns:
- This, for chaining.
 
 
- 
 
-