Skip to content

API reference / @jsprismarine/brigadier / StringArgumentType

Class: StringArgumentType ​

Defined in: arguments/StringArgumentType.ts:13

Implements ​

Methods ​

getExamples() ​

getExamples(): Iterable<string>

Defined in: arguments/StringArgumentType.ts:85

Returns sample strings that CommandNode.findAmbiguities parses against sibling nodes to detect overlapping argument types. The samples cover one bare word, one word with underscores, and one phrase with spaces, so they exercise all three StringType forms.

Returns ​

Iterable<string>

Implementation of ​

ArgumentType.getExamples


getType() ​

getType(): StringType

Defined in: arguments/StringArgumentType.ts:36

Returns ​

StringType


parse() ​

parse(reader): string

Defined in: arguments/StringArgumentType.ts:40

Parameters ​

reader ​

StringReader

Returns ​

string

Implementation of ​

ArgumentType.parse


toString() ​

toString(): string

Defined in: arguments/StringArgumentType.ts:52

Returns a string representation of an object.

Returns ​

string


escapeIfRequired() ​

static escapeIfRequired(input): String

Defined in: arguments/StringArgumentType.ts:56

Parameters ​

input ​

string

Returns ​

String


getString() ​

static getString<S>(context, name): string

Defined in: arguments/StringArgumentType.ts:32

Type Parameters ​

S ​

S

Parameters ​

context ​

CommandContext<S>

name ​

string

Returns ​

string


greedyString() ​

static greedyString(): StringArgumentType

Defined in: arguments/StringArgumentType.ts:28

Returns ​

StringArgumentType


string() ​

static string(): StringArgumentType

Defined in: arguments/StringArgumentType.ts:24

Returns ​

StringArgumentType


word() ​

static word(): StringArgumentType

Defined in: arguments/StringArgumentType.ts:20

Returns ​

StringArgumentType