From 4cd53574591192e5ade35d6bbab35832c32ce288 Mon Sep 17 00:00:00 2001 From: maxxie114 Date: Thu, 21 Sep 2017 00:33:31 -0700 Subject: [PATCH] Update Server.php --- src/pocketmine/Server.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index c425ff472..cad53d0d3 100755 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -409,7 +409,7 @@ public function getIp(){ * @return string */ public function getServerName(){ - return $this->getConfigString("motd", "Minecraft: PE Server"); + return $this->getConfigString("motd", "An MCPE Server"); } /** @@ -483,7 +483,7 @@ public function getGamemode(){ * @return bool */ public function getForceGamemode(){ - return $this->getConfigBoolean("force-gamemode", false); + return $this->getConfigBoolean("force-gamemode", true); } /** @@ -534,6 +534,7 @@ public static function getGamemodeFromString($str){ case (string) Player::SPECTATOR: case "spectator": + case "sp": case "view": case "v": return Player::SPECTATOR; @@ -575,7 +576,7 @@ public static function getDifficultyFromString($str){ * @return int */ public function getDifficulty(){ - return $this->getConfigInt("difficulty", 1); + return $this->getConfigInt("difficulty", 2); } /** @@ -589,7 +590,7 @@ public function hasWhitelist(){ * @return int */ public function getSpawnRadius(){ - return $this->getConfigInt("spawn-protection", 16); + return $this->getConfigInt("spawn-protection", 9); } /** @@ -617,7 +618,7 @@ public function getDefaultGamemode(){ * @return string */ public function getMotd(){ - return $this->getConfigString("motd", "Minecraft: PE Server"); + return $this->getConfigString("motd", "An MCPE Server"); } /** @@ -1497,11 +1498,11 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $ $this->logger->info("Loading server properties..."); $this->properties = new Config($this->dataPath . "server.properties", Config::PROPERTIES, [ - "motd" => "Minecraft: PE Server", + "motd" => "An MCPE Server", "server-port" => 19132, "memory-limit" => "256M", "white-list" => false, - "spawn-protection" => 16, + "spawn-protection" => 9, "max-players" => 20, "allow-flight" => false, "spawn-animals" => true, @@ -1509,10 +1510,10 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $ "spawn-mobs" => true, "mobs-limit" => 0, "gamemode" => 0, - "force-gamemode" => false, + "force-gamemode" => true, "hardcore" => false, "pvp" => true, - "difficulty" => 1, + "difficulty" => 2, "generator-settings" => "", "level-name" => "world", "level-seed" => "",