Server: drop support for tagging generator options onto the 'generator' key in pocketmine.yml

the 'preset' key should be used for this purpose instead.

This couldn't be dropped until now due to the shitty handling of unknown generators.
This commit is contained in:
Dylan K. Taylor 2021-10-11 17:20:49 +01:00
parent 70deea0ef9
commit 89d7b7198f
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -989,15 +989,11 @@ class Server{
//TODO: error checking
if(isset($options["generator"])){
$generatorOptions = explode(":", $options["generator"]);
$generatorClass = $getGenerator(array_shift($generatorOptions), $name);
$generatorClass = $getGenerator($options["generator"], $name);
if($generatorClass === null){
continue;
}
$creationOptions->setGeneratorClass($generatorClass);
if(count($generatorOptions) > 0){
$creationOptions->setGeneratorOptions(implode(":", $generatorOptions));
}
}
if(isset($options["difficulty"]) && is_string($options["difficulty"])){
$creationOptions->setDifficulty(World::getDifficultyFromString($options["difficulty"]));