Add language option to server.properties (#2531)

This allows to save the language without rewriting pocketmine.yml. Since this is a "standard" config option (something that the user might want to directly modify) it's reasonable to put it in server.properties. pocketmine.yml is generally reserved for more advanced configuration options.
This commit is contained in:
Dylan T
2018-11-30 13:25:04 +00:00
committed by GitHub
parent 05dba61a69
commit 6295ef8a81
3 changed files with 32 additions and 30 deletions

View File

@ -66,6 +66,10 @@ class SetupWizard{
}
}while($lang === null);
$config = new Config(\pocketmine\DATA . "server.properties", Config::PROPERTIES);
$config->set("language", $lang);
$config->save();
$this->lang = new BaseLang($lang);
$this->message($this->lang->get("language_has_been_selected"));