Skip to content

Interface IArgumentType

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

Defines command argument parsing and completion behavior.

public interface IArgumentType : IAnyArgumentType

Implements

IAnyArgumentType

Properties

Examples

Gets representative valid input strings.

IEnumerable<string> Examples { get; }

Property Value

IEnumerable<string>

Methods

As<T>()

Casts this argument type to a requested argument interface or implementation.

T As<T>() where T : IAnyArgumentType

Returns

T

This instance cast to T.

Type Parameters

T

The target argument type.

Exceptions

InvalidCastException

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

ValueTask<Suggestions>

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

IArgumentValue

The parsed argument value.