Interface IArgumentType
Namespace: Void.Minecraft.Commands.Brigadier.ArgumentTypes
Assembly: Void.Minecraft.dll
Defines command argument parsing and completion behavior.
public interface IArgumentType : IAnyArgumentTypeImplements
Properties
Examples
Gets representative valid input strings.
IEnumerable<string> Examples { get; }Property Value
Methods
As<T>()
Casts this argument type to a requested argument interface or implementation.
T As<T>() where T : IAnyArgumentTypeReturns
T
This instance cast to T.
Type Parameters
T
The target argument type.
Exceptions
This instance is not assignable to T.
ListSuggestionsAsync(CommandContext, SuggestionsBuilder, CancellationToken)
Lists completions for this argument type.
ValueTask<Suggestions> ListSuggestionsAsync(CommandContext context, SuggestionsBuilder builder, CancellationToken cancellationToken)Parameters
context CommandContext
The parsed command context.
builder SuggestionsBuilder
The suggestion builder.
cancellationToken CancellationToken
A token that may cancel asynchronous providers.
Returns
The suggestions; the default implementation returns
Parse(StringReader)
Parses a value from the reader’s current cursor.
IArgumentValue Parse(StringReader reader)Parameters
reader StringReader
The command reader to consume.
Returns
The parsed argument value.