Class CommandNode
Namespace: Void.Minecraft.Commands.Brigadier.Tree
Assembly: Void.Minecraft.dll
public abstract class CommandNode : ICommandNodeInheritance
Derived
ArgumentCommandNode, LiteralCommandNode, RootCommandNode
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
CommandNode(CommandExecutor?, CommandRequirement?, CommandNode?, RedirectModifier?, bool)
protected CommandNode(CommandExecutor? executor = null, CommandRequirement? requirement = null, CommandNode? redirectTarget = null, RedirectModifier? redirectModifier = null, bool isForks = false)Parameters
executor CommandExecutor?
requirement CommandRequirement?
redirectTarget CommandNode?
redirectModifier RedirectModifier?
isForks bool
Properties
Children
public IEnumerable<CommandNode> Children { get; }Property Value
Examples
public abstract IEnumerable<string> Examples { get; }Property Value
Executor
public CommandExecutor? Executor { get; set; }Property Value
IsForks
public bool IsForks { get; set; }Property Value
Name
public abstract string Name { get; }Property Value
RedirectModifier
public RedirectModifier? RedirectModifier { get; set; }Property Value
RedirectTarget
public CommandNode? RedirectTarget { get; set; }Property Value
Requirement
public CommandRequirement? Requirement { get; set; }Property Value
SortedKey
protected abstract string SortedKey { get; }Property Value
UsageText
public abstract string UsageText { get; }Property Value
Methods
AddChild(CommandNode)
public void AddChild(CommandNode node)Parameters
node CommandNode
CanUseAsync(ICommandSource, CancellationToken)
public ValueTask<bool> CanUseAsync(ICommandSource source, CancellationToken cancellationToken)Parameters
source ICommandSource
cancellationToken CancellationToken
Returns
CreateBuilder()
public abstract IArgumentBuilder<CommandNode> CreateBuilder()Returns
FindAmbiguities(AmbiguousConsumer)
public void FindAmbiguities(AmbiguousConsumer consumer)Parameters
consumer AmbiguousConsumer
GetChild(string)
public CommandNode GetChild(string name)Parameters
name string
Returns
GetRelevantNodes(StringReader)
public IEnumerable<CommandNode> GetRelevantNodes(StringReader reader)Parameters
reader StringReader
Returns
IsValidInput(string)
public abstract bool IsValidInput(string input)Parameters
input string
Returns
ListSuggestionsAsync(CommandContext, SuggestionsBuilder, CancellationToken)
public abstract ValueTask<Suggestions> ListSuggestionsAsync(CommandContext context, SuggestionsBuilder builder, CancellationToken cancellationToken)Parameters
context CommandContext
builder SuggestionsBuilder
cancellationToken CancellationToken
Returns
Parse(StringReader, CommandContextBuilder)
public abstract void Parse(StringReader reader, CommandContextBuilder context)Parameters
reader StringReader
context CommandContextBuilder
RemoveChild(string)
public bool RemoveChild(string name)Parameters
name string