Class CommandContext
Namespace: Void.Minecraft.Commands.Brigadier.Context
Assembly: Void.Minecraft.dll
public record CommandContext : IEquatable<CommandContext>Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
CommandContext(ICommandSource, string, Dictionary<string, IParsedArgument>, CommandExecutor?, CommandNode, List<ParsedCommandNode>, StringRange, CommandContext?, RedirectModifier?, bool)
public CommandContext(ICommandSource Source, string Input, Dictionary<string, IParsedArgument> Arguments, CommandExecutor? Executor, CommandNode RootNode, List<ParsedCommandNode> Nodes, StringRange Range, CommandContext? Child, RedirectModifier? RedirectModifier, bool Forks)Parameters
Source ICommandSource
Input string
Arguments Dictionary<string, IParsedArgument>
Executor CommandExecutor?
RootNode CommandNode
Nodes List<ParsedCommandNode>
Range StringRange
Child CommandContext?
RedirectModifier RedirectModifier?
Forks bool
Properties
Arguments
public Dictionary<string, IParsedArgument> Arguments { get; init; }Property Value
Dictionary<string, IParsedArgument>
Child
public CommandContext? Child { get; init; }Property Value
Executor
public CommandExecutor? Executor { get; init; }Property Value
Forks
public bool Forks { get; init; }Property Value
HasNodes
public bool HasNodes { get; }Property Value
Input
public string Input { get; init; }Property Value
Nodes
public List<ParsedCommandNode> Nodes { get; init; }Property Value
Range
public StringRange Range { get; init; }Property Value
RedirectModifier
public RedirectModifier? RedirectModifier { get; init; }Property Value
RootNode
public CommandNode RootNode { get; init; }Property Value
Source
public ICommandSource Source { get; init; }Property Value
Methods
CopyFor(ICommandSource)
public CommandContext CopyFor(ICommandSource source)Parameters
source ICommandSource
Returns
GetArgument<TType>(string)
public TType GetArgument<TType>(string name)Parameters
name string
Returns
TType
Type Parameters
TType
GetLastChild()
public CommandContext GetLastChild()Returns
TryGetArgument<TType>(string, out TType)
public bool TryGetArgument<TType>(string name, out TType type)Parameters
name string
type TType
Returns
Type Parameters
TType