diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 91db6ac04..e9934c944 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -26,7 +26,7 @@ class PocketMinecraftServer{ private function load(){ $this->version = new VersionString(); - if(!defined("DEBUG") or DEBUG >= 0){ + if(defined("DEBUG") and DEBUG >= 0){ @cli_set_process_title("PocketMine-MP ".MAJOR_VERSION); } if($this->version->isDev()){ @@ -89,7 +89,7 @@ class PocketMinecraftServer{ public function titleTick(){ $time = microtime(true); - if((!defined("DEBUG") or DEBUG >= 0) and ENABLE_ANSI === true){ + if(defined("DEBUG") and DEBUG >= 0 and ENABLE_ANSI === true){ echo "\x1b]0;PocketMine-MP ".MAJOR_VERSION." | Online ". count($this->clients)."/".$this->maxClients." | RAM ".round((memory_get_usage() / 1024) / 1024, 2)."MB | U ".round(($this->interface->bandwidth[1] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2)." D ".round(($this->interface->bandwidth[0] / max(1, $time - $this->interface->bandwidth[2])) / 1024, 2)." kB/s | TPS ".$this->getTPS()."\x07"; } $this->interface->bandwidth = array(0, 0, $time); diff --git a/src/tests/ServerSuiteTest.php b/src/tests/ServerSuiteTest.php index 19e430a88..5d2b2cbf1 100644 --- a/src/tests/ServerSuiteTest.php +++ b/src/tests/ServerSuiteTest.php @@ -5,7 +5,7 @@ private $server; public function testStart(){ define("NO_THREADS", true); - //define("DEBUG", -1); //No output + define("DEBUG", -1); //No output require_once(dirname(__FILE__)."/../dependencies.php"); require_once(FILE_PATH."/src/functions.php"); require_once(FILE_PATH."/src/dependencies.php"); @@ -24,11 +24,9 @@ $server->init(); } - public function hook(){ - $this->server = ServerAPI::request(); - + public function hook(){ //Everything done! - $this->server->close(); + ServerAPI::request()->close(); } } }