Skip to content

Class StringArgumentType

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

Parses one word, a quotable phrase, or the entire remaining input.

public record StringArgumentType : IArgumentType, IAnyArgumentType, IEquatable<StringArgumentType>

Inheritance

objectStringArgumentType

Implements

IArgumentType, IAnyArgumentType, IEquatable<StringArgumentType>

Inherited Members

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

Properties

Examples

Gets representative valid input strings.

public IEnumerable<string> Examples { get; }

Property Value

IEnumerable<string>

Type

Gets the string parsing mode.

public StringArgumentType.StringType Type { get; init; }

Property Value

StringArgumentType.StringType

Methods

GreedyString()

Creates an argument that consumes every remaining character.

public static StringArgumentType GreedyString()

Returns

StringArgumentType

The argument type.

Parse(StringReader)

Parses a value from the reader’s current cursor.

public IArgumentValue Parse(StringReader reader)

Parameters

reader StringReader

The command reader to consume.

Returns

IArgumentValue

The parsed argument value.

String()

Creates an argument accepting either a quoted phrase or one unquoted word.

public static StringArgumentType String()

Returns

StringArgumentType

The argument type.

Word()

Creates a single-unquoted-word argument.

public static StringArgumentType Word()

Returns

StringArgumentType

The argument type.