Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Server.php #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/pocketmine/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

/**
Expand Down Expand Up @@ -483,7 +483,7 @@ public function getGamemode(){
* @return bool
*/
public function getForceGamemode(){
return $this->getConfigBoolean("force-gamemode", false);
return $this->getConfigBoolean("force-gamemode", true);
}

/**
Expand Down Expand Up @@ -534,6 +534,7 @@ public static function getGamemodeFromString($str){

case (string) Player::SPECTATOR:
case "spectator":
case "sp":
case "view":
case "v":
return Player::SPECTATOR;
Expand Down Expand Up @@ -575,7 +576,7 @@ public static function getDifficultyFromString($str){
* @return int
*/
public function getDifficulty(){
return $this->getConfigInt("difficulty", 1);
return $this->getConfigInt("difficulty", 2);
}

/**
Expand All @@ -589,7 +590,7 @@ public function hasWhitelist(){
* @return int
*/
public function getSpawnRadius(){
return $this->getConfigInt("spawn-protection", 16);
return $this->getConfigInt("spawn-protection", 9);
}

/**
Expand Down Expand Up @@ -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");
}

/**
Expand Down Expand Up @@ -1497,22 +1498,22 @@ 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,
"animals-limit" => 0,
"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" => "",
Expand Down