Interface ParserArgument<T>
- Type Parameters:
T- The type of object thatparse(StringReader)returns.
- All Superinterfaces:
Parser<T>
- All Known Implementing Classes:
ParserArgument.WithSuggestions
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAParserArgumentthat also places suggestions at the cursor of theStringReaderwhen invoked. -
Method Summary
Modifier and TypeMethodDescriptiongetResult(com.mojang.brigadier.StringReader reader) Parses the given input.parse(com.mojang.brigadier.StringReader reader) Parses the given input and either returns the corresponding object or throws an exception explaining why the input could not be interpreted.default ParserArgument.WithSuggestions<T> suggests(SuggestionProvider suggestions) Adds suggestions to theResultof thisParserArgument.Methods inherited from interface dev.jorel.commandapi.arguments.parser.Parser
listSuggestions
-
Method Details
-
parse
-
getResult
-
suggests
Adds suggestions to theResultof thisParserArgument. The suggestions will be placed where the cursor of theStringReaderwas when the parser was invoked.- Parameters:
suggestions- TheSuggestionProviderobject that will generate the suggestions.- Returns:
- A
ParserArgument.WithSuggestionsobject to continue the building process with.
-