CommandAPI 9.6.0
An API for the command UI introduced in Minecraft 1.13
com.mojang.brigadier.arguments.StringArgumentType.StringType Enum Reference

The type of phrase that is matched by StringArgumentType. More...

Public Member Functions

 StringType (final String... examples)
 
Collection< String > getExamples ()
 Returns some examples that define this type, which are used to detect ambiguities. More...
 

Public Attributes

 SINGLE_WORD =("word", "words_with_underscores")
 Matches a single word. More...
 
 QUOTABLE_PHRASE =("\"quoted phrase\"", "word", "\"\"")
 Matches what SINGLE_WORD matches or a phrase surrounded by quotes ("), optionally containing escaped characters.
 
 GREEDY_PHRASE =("word", "words with spaces", "\"and symbols\"")
 Just greedily matches the whole available input.
 

Detailed Description

The type of phrase that is matched by StringArgumentType.

Member Function Documentation

◆ getExamples()

Collection< String > com.mojang.brigadier.arguments.StringArgumentType.StringType.getExamples ( )

Returns some examples that define this type, which are used to detect ambiguities.

Returns
some examples that define this type, which are used to detect ambiguities
See also
ArgumentType::getExamples()

Member Data Documentation

◆ SINGLE_WORD

com.mojang.brigadier.arguments.StringArgumentType.StringType.SINGLE_WORD =("word", "words_with_underscores")

Matches a single word.

Can contain the characters outlined in StringReader#isAllowedInUnquotedString(char). Everything else constitutes a word border.