Class GameModeArgument
java.lang.Object
net.minecraft.commands.arguments.GameModeArgument
- All Implemented Interfaces:
ArgumentType<GameType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DynamicCommandExceptionTypeprivate static final Collection<String> private static final GameType[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GameModeArgumentgameMode()static GameTypegetGameMode(CommandContext<CommandSourceStack> context, String name) listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) parse(StringReader reader) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ArgumentType
parse
-
Field Details
-
EXAMPLES
-
VALUES
-
ERROR_INVALID
-
-
Constructor Details
-
GameModeArgument
public GameModeArgument()
-
-
Method Details
-
parse
- Specified by:
parsein interfaceArgumentType<GameType>- Throws:
CommandSyntaxException
-
listSuggestions
public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) - Specified by:
listSuggestionsin interfaceArgumentType<GameType>
-
getExamples
- Specified by:
getExamplesin interfaceArgumentType<GameType>
-
gameMode
-
getGameMode
public static GameType getGameMode(CommandContext<CommandSourceStack> context, String name) throws CommandSyntaxException - Throws:
CommandSyntaxException
-