Skip to content

Class CommandNode

Namespace: Void.Minecraft.Commands.Brigadier.Tree
Assembly: Void.Minecraft.dll

public abstract class CommandNode : ICommandNode

Inheritance

objectCommandNode

Derived

ArgumentCommandNode, LiteralCommandNode, RootCommandNode

Implements

ICommandNode

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

IEnumerable<CommandNode>

Examples

public abstract IEnumerable<string> Examples { get; }

Property Value

IEnumerable<string>

Executor

public CommandExecutor? Executor { get; set; }

Property Value

CommandExecutor?

IsForks

public bool IsForks { get; set; }

Property Value

bool

Name

public abstract string Name { get; }

Property Value

string

RedirectModifier

public RedirectModifier? RedirectModifier { get; set; }

Property Value

RedirectModifier?

RedirectTarget

public CommandNode? RedirectTarget { get; set; }

Property Value

CommandNode?

Requirement

public CommandRequirement? Requirement { get; set; }

Property Value

CommandRequirement?

SortedKey

protected abstract string SortedKey { get; }

Property Value

string

UsageText

public abstract string UsageText { get; }

Property Value

string

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

ValueTask<bool>

CreateBuilder()

public abstract IArgumentBuilder<CommandNode> CreateBuilder()

Returns

IArgumentBuilder<CommandNode>

FindAmbiguities(AmbiguousConsumer)

public void FindAmbiguities(AmbiguousConsumer consumer)

Parameters

consumer AmbiguousConsumer

GetChild(string)

public CommandNode GetChild(string name)

Parameters

name string

Returns

CommandNode

GetRelevantNodes(StringReader)

public IEnumerable<CommandNode> GetRelevantNodes(StringReader reader)

Parameters

reader StringReader

Returns

IEnumerable<CommandNode>

IsValidInput(string)

public abstract bool IsValidInput(string input)

Parameters

input string

Returns

bool

ListSuggestionsAsync(CommandContext, SuggestionsBuilder, CancellationToken)

public abstract ValueTask<Suggestions> ListSuggestionsAsync(CommandContext context, SuggestionsBuilder builder, CancellationToken cancellationToken)

Parameters

context CommandContext

builder SuggestionsBuilder

cancellationToken CancellationToken

Returns

ValueTask<Suggestions>

Parse(StringReader, CommandContextBuilder)

public abstract void Parse(StringReader reader, CommandContextBuilder context)

Parameters

reader StringReader

context CommandContextBuilder