Fixed always-true condition in world loading

this has a couple of side effects which need to be explored.
- first of all, this bug prevented generateLevel() from filling in the preset from server.properties. With this fix, worlds which don't have any extra generator settings will start to be generated using server.properties settings, which is almost certainly not expected behaviour.
- preset can now be specified separately from generator in pocketmine.yml, which is nicer for users.
This commit is contained in:
Dylan K. Taylor 2020-10-24 11:10:35 +01:00
parent 2a1d1e90a2
commit 55ecac4c80

View File

@ -1543,7 +1543,7 @@ class Server{
if(isset($options["generator"])){
$generatorOptions = explode(":", $options["generator"]);
$generator = GeneratorManager::getGenerator(array_shift($generatorOptions));
if(count($options) > 0){
if(count($generatorOptions) > 0){
$options["preset"] = implode(":", $generatorOptions);
}
}else{