mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 19:34:15 +00:00
Server: do not attempt to generate a new world if it already exists
This commit is contained in:
parent
8fd475f87b
commit
01c0602043
@ -992,7 +992,7 @@ class Server{
|
|||||||
}elseif(!is_array($options)){
|
}elseif(!is_array($options)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!$this->worldManager->loadWorld($name, true)){
|
if(!$this->worldManager->loadWorld($name, true) && !$this->worldManager->isWorldGenerated($name)){
|
||||||
$creationOptions = WorldCreationOptions::create();
|
$creationOptions = WorldCreationOptions::create();
|
||||||
//TODO: error checking
|
//TODO: error checking
|
||||||
|
|
||||||
@ -1028,7 +1028,7 @@ class Server{
|
|||||||
$default = "world";
|
$default = "world";
|
||||||
$this->configGroup->setConfigString("level-name", "world");
|
$this->configGroup->setConfigString("level-name", "world");
|
||||||
}
|
}
|
||||||
if(!$this->worldManager->loadWorld($default, true)){
|
if(!$this->worldManager->loadWorld($default, true) && !$this->worldManager->isWorldGenerated($default)){
|
||||||
$generatorName = $this->configGroup->getConfigString("level-type");
|
$generatorName = $this->configGroup->getConfigString("level-type");
|
||||||
$generatorOptions = $this->configGroup->getConfigString("generator-settings");
|
$generatorOptions = $this->configGroup->getConfigString("generator-settings");
|
||||||
$generatorClass = $getGenerator($generatorName, $generatorOptions, $default);
|
$generatorClass = $getGenerator($generatorName, $generatorOptions, $default);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user