Package net.forthecrown.grenadier.types
Interface GameModeArgument
- All Superinterfaces:
ArgumentType<GameMode>
Argument type that parses a gamemode.
Valid inputs:
- survival: 'survival', 's', '0' - creative: 'creative', 'c', '1' - adventure: 'adventure', 'a', '3' - spectator: 'spectator', 'sp', '2'
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlistSuggestions
(CommandContext<S> context, SuggestionsBuilder builder) parse
(StringReader reader) Methods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples
-
Field Details
-
BY_LABEL
Label to Gamemode map. This map is used to parse the gamemode from player input
-
-
Method Details
-
parse
- Specified by:
parse
in interfaceArgumentType<GameMode>
- Throws:
CommandSyntaxException
-
listSuggestions
<S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestions
in interfaceArgumentType<GameMode>
-