E - The type of the executorpublic class RedirectNode<E> extends ArgumentNode<E,java.lang.Void>
providesArgument, weight| Constructor and Description |
|---|
RedirectNode(ArgumentNode<E,?> targetNode) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ArgumentNode<E,?>> |
children() |
ArgumentNode<E,java.lang.Void> |
completions(CompletionsProvider<E> completionsProvider)
Set the custom completions provider of this argument node.
|
CompletionsProvider<E> |
completionsProvider() |
CommandExceptionHandler<E> |
exceptionHandler() |
ArgumentNode<E,java.lang.Void> |
exceptionHandler(CommandExceptionHandler<E> exceptionHandler)
Set the exception handler of this argument node.
|
ArgumentNode<E,java.lang.Void> |
executes(java.util.function.Consumer<ExecutionContext<E>> consumer)
Set the
Consumer executor of this argument node. |
ArgumentNode<E,java.lang.Void> |
executes(java.util.function.Function<ExecutionContext<E>,?> function)
Set the
Function executor of this argument node. |
ArgumentNode<E,java.lang.Void> |
executes(java.lang.Runnable runnable)
Set the
Runnable executor of this argument node. |
ArgumentNode<E,java.lang.Void> |
executes(java.util.function.Supplier<?> supplier)
Set the
Supplier executor of this argument node. |
java.util.function.Function<ExecutionContext<E>,?> |
executor() |
java.util.List<ArgumentChain<E>> |
getTargetChains() |
ArgumentNode<E,?> |
getTargetNode() |
protected void |
parseCompletions(java.util.Set<java.lang.String> completions,
CompletionContext completionContext,
ExecutionContext<E> executionContext,
StringReader stringReader)
Provide the completions of this argument.
|
protected java.lang.Void |
parseValue(ExecutionContext<E> executionContext,
StringReader stringReader)
Parse the value of this argument.
|
boolean |
providesArgument() |
ArgumentNode<E,java.lang.Void> |
then(ArgumentNode<E,?> child)
Add a child to this argument node.
|
ArgumentNode<E,java.lang.Void> |
then(java.util.List<ArgumentNode<E,?>> children)
Add multiple children to this argument node.
|
java.util.function.Predicate<java.lang.Void> |
validator() |
ArgumentNode<E,java.lang.Void> |
validator(java.util.function.Predicate<java.lang.Void> validator)
Set the validator of this argument node.
|
description, name, parseCompletions, requirement, requires, value, weightpublic RedirectNode(ArgumentNode<E,?> targetNode)
public ArgumentNode<E,?> getTargetNode()
public java.util.List<ArgumentChain<E>> getTargetChains()
@Nonnull protected java.lang.Void parseValue(ExecutionContext<E> executionContext, StringReader stringReader) throws ArgumentParseException, java.lang.RuntimeException
ArgumentNodeparseValue in class ArgumentNode<E,java.lang.Void>executionContext - The execution contextstringReader - The string readerArgumentParseException - If the value could not be parsedjava.lang.RuntimeException - If an unexpected error occurredprotected void parseCompletions(java.util.Set<java.lang.String> completions,
CompletionContext completionContext,
ExecutionContext<E> executionContext,
StringReader stringReader)
ArgumentNodeparseCompletions in class ArgumentNode<E,java.lang.Void>completions - The completionscompletionContext - The completion contextexecutionContext - The execution contextstringReader - The string readerpublic java.util.List<ArgumentNode<E,?>> children()
children in class ArgumentNode<E,java.lang.Void>public boolean providesArgument()
providesArgument in class ArgumentNode<E,java.lang.Void>StringNode)@Nullable public java.util.function.Predicate<java.lang.Void> validator()
validator in class ArgumentNode<E,java.lang.Void>public ArgumentNode<E,java.lang.Void> then(java.util.List<ArgumentNode<E,?>> children)
ArgumentNodethen in class ArgumentNode<E,java.lang.Void>children - The childrenpublic ArgumentNode<E,java.lang.Void> then(ArgumentNode<E,?> child)
ArgumentNodethen in class ArgumentNode<E,java.lang.Void>child - The childpublic ArgumentNode<E,java.lang.Void> validator(@Nullable java.util.function.Predicate<java.lang.Void> validator)
ArgumentNodevalidator in class ArgumentNode<E,java.lang.Void>validator - The validator@Nullable public CompletionsProvider<E> completionsProvider()
completionsProvider in class ArgumentNode<E,java.lang.Void>public ArgumentNode<E,java.lang.Void> completions(@Nullable CompletionsProvider<E> completionsProvider)
ArgumentNodecompletions in class ArgumentNode<E,java.lang.Void>completionsProvider - The completions provider@Nullable public CommandExceptionHandler<E> exceptionHandler()
exceptionHandler in class ArgumentNode<E,java.lang.Void>public ArgumentNode<E,java.lang.Void> exceptionHandler(@Nullable CommandExceptionHandler<E> exceptionHandler)
ArgumentNodeexceptionHandler in class ArgumentNode<E,java.lang.Void>exceptionHandler - The exception handler@Nullable public java.util.function.Function<ExecutionContext<E>,?> executor()
executor in class ArgumentNode<E,java.lang.Void>public ArgumentNode<E,java.lang.Void> executes(java.lang.Runnable runnable)
ArgumentNodeRunnable executor of this argument node.executes in class ArgumentNode<E,java.lang.Void>runnable - The runnablepublic ArgumentNode<E,java.lang.Void> executes(java.util.function.Consumer<ExecutionContext<E>> consumer)
ArgumentNodeConsumer executor of this argument node.executes in class ArgumentNode<E,java.lang.Void>consumer - The consumerpublic ArgumentNode<E,java.lang.Void> executes(java.util.function.Supplier<?> supplier)
ArgumentNodeSupplier executor of this argument node.executes in class ArgumentNode<E,java.lang.Void>supplier - The supplierpublic ArgumentNode<E,java.lang.Void> executes(java.util.function.Function<ExecutionContext<E>,?> function)
ArgumentNodeFunction executor of this argument node.executes in class ArgumentNode<E,java.lang.Void>function - The function