the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "net.minecraft.commands.h"
3#include "GameModeCommand.h"
4
5EGameCommand GameModeCommand::getId()
6{
7 return eGameCommand_GameMode;
8}
9
10int GameModeCommand::getPermissionLevel()
11{
12 return LEVEL_GAMEMASTERS;
13}
14
15void GameModeCommand::execute(shared_ptr<CommandSender> source, byteArray commandData)
16{
17 //if (args.length > 0) {
18 // GameType newMode = getModeForString(source, args[0]);
19 // Player player = args.length >= 2 ? convertToPlayer(source, args[1]) : convertSourceToPlayer(source);
20
21 // player.setGameMode(newMode);
22 // player.fallDistance = 0; // reset falldistance so flying people do not die :P
23
24 // ChatMessageComponent mode = ChatMessageComponent.forTranslation("gameMode." + newMode.getName());
25
26 // if (player != source) {
27 // logAdminAction(source, AdminLogCommand.LOGTYPE_DONT_SHOW_TO_SELF, "commands.gamemode.success.other", player.getAName(), mode);
28 // } else {
29 // logAdminAction(source, AdminLogCommand.LOGTYPE_DONT_SHOW_TO_SELF, "commands.gamemode.success.self", mode);
30 // }
31
32 // return;
33 //}
34
35 //throw new UsageException("commands.gamemode.usage");
36}
37
38GameType *GameModeCommand::getModeForString(shared_ptr<CommandSender> source, const wstring &name)
39{
40 return NULL;
41 //if (name.equalsIgnoreCase(GameType.SURVIVAL.getName()) || name.equalsIgnoreCase("s")) {
42 // return GameType.SURVIVAL;
43 //} else if (name.equalsIgnoreCase(GameType.CREATIVE.getName()) || name.equalsIgnoreCase("c")) {
44 // return GameType.CREATIVE;
45 //} else if (name.equalsIgnoreCase(GameType.ADVENTURE.getName()) || name.equalsIgnoreCase("a")) {
46 // return GameType.ADVENTURE;
47 //} else {
48 // return LevelSettings.validateGameType(convertArgToInt(source, name, 0, GameType.values().length - 2));
49 //}
50}