mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-21 10:54:05 +00:00
beware users putting garbage in pocketmine.yml
This commit is contained in:
parent
3b85e558ce
commit
2635c85873
@ -1379,7 +1379,7 @@ class Server{
|
|||||||
if(is_array($value)){
|
if(is_array($value)){
|
||||||
$commands = $value;
|
$commands = $value;
|
||||||
}else{
|
}else{
|
||||||
$commands[] = $value;
|
$commands[] = (string) $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[$key] = $commands;
|
$result[$key] = $commands;
|
||||||
@ -1653,6 +1653,9 @@ class Server{
|
|||||||
Generator::addGenerator(Nether::class, "nether");
|
Generator::addGenerator(Nether::class, "nether");
|
||||||
|
|
||||||
foreach((array) $this->getProperty("worlds", []) as $name => $options){
|
foreach((array) $this->getProperty("worlds", []) as $name => $options){
|
||||||
|
if(!is_array($options)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if($this->loadLevel($name) === false){
|
if($this->loadLevel($name) === false){
|
||||||
$seed = $options["seed"] ?? time();
|
$seed = $options["seed"] ?? time();
|
||||||
if(is_string($seed) and !is_numeric($seed)){
|
if(is_string($seed) and !is_numeric($seed)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user