mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Changed generator choosing logic, add proper preset if needed, fixes #2751
This commit is contained in:
parent
37bc1273ee
commit
7c76c1e3d7
@ -1139,10 +1139,11 @@ class Server{
|
||||
|
||||
$seed = $seed === null ? Binary::readInt(@Utils::getRandomBytes(4, false)) : (int) $seed;
|
||||
|
||||
if($generator !== null and class_exists($generator) and is_subclass_of($generator, Generator::class)){
|
||||
$generator = new $generator($options);
|
||||
}else{
|
||||
if(!isset($options["presey"])){
|
||||
$options["preset"] = $this->getConfigString("generator-settings", "");
|
||||
}
|
||||
|
||||
if(!($generator !== null and class_exists($generator, true) and is_subclass_of($generator, Generator::class))){
|
||||
$generator = Generator::getGenerator($this->getLevelType());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user