mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
World loading: Actually use the data in each item instead of getProperty()
This commit is contained in:
parent
bc0434913e
commit
f565791e41
@ -1650,10 +1650,8 @@ class Server{
|
|||||||
Generator::addGenerator(Nether::class, "hell");
|
Generator::addGenerator(Nether::class, "hell");
|
||||||
Generator::addGenerator(Nether::class, "nether");
|
Generator::addGenerator(Nether::class, "nether");
|
||||||
|
|
||||||
foreach((array) $this->getProperty("worlds", []) as $name => $worldSetting){
|
foreach((array) $this->getProperty("worlds", []) as $name => $options){
|
||||||
if($this->loadLevel($name) === false){
|
if($this->loadLevel($name) === false){
|
||||||
$options = $this->getProperty("worlds.$name");
|
|
||||||
|
|
||||||
$seed = $options["seed"] ?? time();
|
$seed = $options["seed"] ?? time();
|
||||||
if(is_string($seed) and !is_numeric($seed)){
|
if(is_string($seed) and !is_numeric($seed)){
|
||||||
$seed = Utils::javaStringHash($seed);
|
$seed = Utils::javaStringHash($seed);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user