Game Mode Argument
Must be one of the following: survival
, creative
, adventure
or spectator
. It returns the GameMode
enum.
Java
new StellarCommand("gamemode")
.addGameModeArgument("mode")
.addExecution(Player.class, context -> {
GameMode mode = context.getArgument<GameMode>("mode")
sender.gamemode = mode
});
Argument Parser