Removed /invisible

This commit is contained in:
Shoghi Cervantes 2013-06-08 19:23:16 +02:00
parent ac486ec970
commit 1014052a57
2 changed files with 0 additions and 26 deletions

View File

@ -41,7 +41,6 @@ class ConsoleAPI{
$this->register("help", "[page|command name]", array($this, "defaultCommands")); $this->register("help", "[page|command name]", array($this, "defaultCommands"));
$this->register("status", "", array($this, "defaultCommands")); $this->register("status", "", array($this, "defaultCommands"));
$this->register("difficulty", "<0|1|2>", array($this, "defaultCommands")); $this->register("difficulty", "<0|1|2>", array($this, "defaultCommands"));
$this->register("invisible", "<on|off>", array($this, "defaultCommands"));
$this->register("stop", "", array($this, "defaultCommands")); $this->register("stop", "", array($this, "defaultCommands"));
$this->register("defaultgamemode", "<mode>", array($this, "defaultCommands")); $this->register("defaultgamemode", "<mode>", array($this, "defaultCommands"));
$this->server->api->ban->cmdWhitelist("help"); $this->server->api->ban->cmdWhitelist("help");
@ -81,26 +80,6 @@ class ConsoleAPI{
$this->server->api->setProperty("gamemode", $gms[strtolower($params[0])]); $this->server->api->setProperty("gamemode", $gms[strtolower($params[0])]);
$output .= "Default Gamemode is now ".strtoupper($this->server->getGamemode()).".\n"; $output .= "Default Gamemode is now ".strtoupper($this->server->getGamemode()).".\n";
break; break;
case "invisible":
$p = strtolower(array_shift($params));
switch($p){
case "on":
case "true":
case "1":
$output .= "Server is invisible\n";
$this->server->api->setProperty("server-invisible", true);
break;
case "off":
case "false":
case "0":
$output .= "Server is visible\n";
$this->server->api->setProperty("server-invisible", false);
break;
default:
$output .= "Usage: /invisible <on | off>\n";
break;
}
break;
case "status": case "status":
if(!($issuer instanceof Player) and $issuer === "console"){ if(!($issuer instanceof Player) and $issuer === "console"){
$this->server->debugInfo(true); $this->server->debugInfo(true);

View File

@ -64,7 +64,6 @@ class ServerAPI{
"server-ip" => "", "server-ip" => "",
"server-port" => 19132, "server-port" => 19132,
"server-type" => "normal", "server-type" => "normal",
"server-invisible" => false,
"memory-limit" => "128M", "memory-limit" => "128M",
"last-update" => false, "last-update" => false,
"white-list" => false, "white-list" => false,
@ -226,12 +225,8 @@ class ServerAPI{
$this->setProperty("memory-limit", "128M"); $this->setProperty("memory-limit", "128M");
} }
if(!$this->config->exists("server-invisible")){
$this->config->set("server-invisible", false);
}
if($this->server instanceof PocketMinecraftServer){ if($this->server instanceof PocketMinecraftServer){
$this->server->setType($this->getProperty("server-type")); $this->server->setType($this->getProperty("server-type"));
$this->server->invisible = $this->getProperty("server-invisible");
$this->server->maxClients = $this->getProperty("max-players"); $this->server->maxClients = $this->getProperty("max-players");
$this->server->description = $this->getProperty("description"); $this->server->description = $this->getProperty("description");
$this->server->motd = $this->getProperty("motd"); $this->server->motd = $this->getProperty("motd");