47 if(count($args) === 0){
51 $gameMode = GameMode::fromString($args[0]);
52 if($gameMode ===
null){
53 $sender->sendMessage(KnownTranslationFactory::pocketmine_command_gamemode_unknown($args[0]));
58 $sender->getServer()->getConfigGroup()->setConfigString(ServerProperties::GAME_MODE, $gameMode->name);
59 $sender->sendMessage(KnownTranslationFactory::commands_defaultgamemode_success($gameMode->getTranslatableName()));