World loading: Actually use the data in each item instead of getProperty()

This commit is contained in:
Dylan K. Taylor 2017-09-28 16:38:10 +01:00
parent bc0434913e
commit f565791e41

View File

@ -1650,10 +1650,8 @@ class Server{
Generator::addGenerator(Nether::class, "hell");
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){
$options = $this->getProperty("worlds.$name");
$seed = $options["seed"] ?? time();
if(is_string($seed) and !is_numeric($seed)){
$seed = Utils::javaStringHash($seed);