From 3abf36ad07b395646d077c93ca9ae55819ed47ef Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 28 Nov 2014 12:47:28 +0100 Subject: [PATCH] Fixed invalid worlds property being set by users --- src/pocketmine/Server.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 6df778c66..5ccc05fdd 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -299,7 +299,7 @@ class Server{ * @return int */ public function getViewDistance(){ - return max(56, $this->getProperty("chunk-sending.max-chunks")); + return max(56, $this->getProperty("chunk-sending.max-chunks", 96)); } /** @@ -313,7 +313,7 @@ class Server{ * @return string */ public function getServerName(){ - return $this->getConfigString("motd", "Unknown server"); + return $this->getConfigString("motd", "Minecraft: PE Server"); } /** @@ -1622,7 +1622,7 @@ class Server{ return; } - foreach($this->getProperty("worlds", []) as $name => $worldSetting){ + foreach((array) $this->getProperty("worlds", []) as $name => $worldSetting){ if($this->loadLevel($name) === false){ $seed = $this->getProperty("worlds.$name.seed", time()); $options = explode(":", $this->getProperty("worlds.$name.generator", Generator::getGenerator("default")));