mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +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;
|
$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)){
|
if(!isset($options["presey"])){
|
||||||
$generator = new $generator($options);
|
|
||||||
}else{
|
|
||||||
$options["preset"] = $this->getConfigString("generator-settings", "");
|
$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());
|
$generator = Generator::getGenerator($this->getLevelType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user