Skip to content

Class CommandContextBuilder

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

public class CommandContextBuilder

Inheritance

objectCommandContextBuilder

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

CommandContextBuilder(CommandDispatcher, ICommandSource, CommandNode, int)

public CommandContextBuilder(CommandDispatcher dispatcher, ICommandSource source, CommandNode rootNode, int start)

Parameters

dispatcher CommandDispatcher

source ICommandSource

rootNode CommandNode

start int

Properties

Arguments

public Dictionary<string, IParsedArgument> Arguments { get; }

Property Value

Dictionary<string, IParsedArgument>

Child

public CommandContextBuilder? Child { get; set; }

Property Value

CommandContextBuilder?

Command

public CommandExecutor? Command { get; set; }

Property Value

CommandExecutor?

Dispatcher

public CommandDispatcher Dispatcher { get; set; }

Property Value

CommandDispatcher

IsFork

public bool IsFork { get; set; }

Property Value

bool

Nodes

public List<ParsedCommandNode> Nodes { get; }

Property Value

List<ParsedCommandNode>

Range

public StringRange Range { get; set; }

Property Value

StringRange

RedirectModifier

public RedirectModifier? RedirectModifier { get; set; }

Property Value

RedirectModifier?

RootNode

public CommandNode RootNode { get; set; }

Property Value

CommandNode

Source

public ICommandSource Source { get; set; }

Property Value

ICommandSource

Start

public int Start { get; set; }

Property Value

int

Methods

Build(string)

public CommandContext Build(string input)

Parameters

input string

Returns

CommandContext

BuildSuggestions(int)

public SuggestionContext BuildSuggestions(int cursor)

Parameters

cursor int

Returns

SuggestionContext

Copy()

public CommandContextBuilder Copy()

Returns

CommandContextBuilder

GetLastChild()

public CommandContextBuilder GetLastChild()

Returns

CommandContextBuilder

WithArgument(string, ParsedArgument)

public CommandContextBuilder WithArgument(string name, ParsedArgument argument)

Parameters

name string

argument ParsedArgument

Returns

CommandContextBuilder

WithChild(CommandContextBuilder)

public CommandContextBuilder WithChild(CommandContextBuilder child)

Parameters

child CommandContextBuilder

Returns

CommandContextBuilder

WithExecutor(CommandExecutor?)

public CommandContextBuilder WithExecutor(CommandExecutor? command)

Parameters

command CommandExecutor?

Returns

CommandContextBuilder

WithNode(CommandNode, StringRange)

public CommandContextBuilder WithNode(CommandNode node, StringRange range)

Parameters

node CommandNode

range StringRange

Returns

CommandContextBuilder

WithSource(ICommandSource)

public CommandContextBuilder WithSource(ICommandSource source)

Parameters

source ICommandSource

Returns

CommandContextBuilder