mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Separate ID handling from GameMode
the aliases of 0,1,2,3 remain for user-interface level compatibility.
This commit is contained in:
@ -27,6 +27,7 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace pocketmine\wizard;
|
||||
|
||||
use pocketmine\data\java\GameModeIdMap;
|
||||
use pocketmine\lang\Language;
|
||||
use pocketmine\lang\LanguageNotFoundException;
|
||||
use pocketmine\player\GameMode;
|
||||
@ -158,7 +159,7 @@ LICENSE;
|
||||
$this->message($this->lang->get("gamemode_info"));
|
||||
|
||||
do{
|
||||
$gamemode = (int) $this->getInput($this->lang->get("default_gamemode"), (string) GameMode::SURVIVAL()->getMagicNumber());
|
||||
$gamemode = (int) $this->getInput($this->lang->get("default_gamemode"), (string) GameModeIdMap::getInstance()->toId(GameMode::SURVIVAL()));
|
||||
}while($gamemode < 0 or $gamemode > 3);
|
||||
$config->set("gamemode", $gamemode);
|
||||
|
||||
|
Reference in New Issue
Block a user