beware users putting garbage in pocketmine.yml

This commit is contained in:
Dylan K. Taylor 2017-10-25 12:54:31 +01:00
parent 3b85e558ce
commit 2635c85873

View File

@ -1379,7 +1379,7 @@ class Server{
if(is_array($value)){
$commands = $value;
}else{
$commands[] = $value;
$commands[] = (string) $value;
}
$result[$key] = $commands;
@ -1653,6 +1653,9 @@ class Server{
Generator::addGenerator(Nether::class, "nether");
foreach((array) $this->getProperty("worlds", []) as $name => $options){
if(!is_array($options)){
continue;
}
if($this->loadLevel($name) === false){
$seed = $options["seed"] ?? time();
if(is_string($seed) and !is_numeric($seed)){