Fixed PHP 5.4 issues

This commit is contained in:
Shoghi Cervantes 2014-03-12 14:03:42 +01:00
parent 18117b91ed
commit 8f990472c6
2 changed files with 1 additions and 7 deletions

View File

@ -46,7 +46,7 @@ class Server{
private function load(){ private function load(){
$this->version = new VersionString(); $this->version = new VersionString();
if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0){ if(defined("PocketMine\\DEBUG") and \PocketMine\DEBUG >= 0 and function_exists("cli_set_process_title")){
@cli_set_process_title("PocketMine-MP " . \PocketMine\VERSION); @cli_set_process_title("PocketMine-MP " . \PocketMine\VERSION);
} }
console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port); console("[INFO] Starting Minecraft PE server on " . ($this->serverip === "0.0.0.0" ? "*" : $this->serverip) . ":" . $this->port);

View File

@ -76,11 +76,6 @@ class ServerAPI{
*/ */
public $ban; public $ban;
/**
* @var EntityAPI
*/
public $entity;
/** /**
* @var TimeAPI * @var TimeAPI
*/ */
@ -160,7 +155,6 @@ class ServerAPI{
console("[INFO] [UPnP] Trying to port forward..."); console("[INFO] [UPnP] Trying to port forward...");
PortForward($this->getProperty("server-port")); PortForward($this->getProperty("server-port"));
} }
$this->server = new Server($this->getProperty("server-name"), $this->getProperty("gamemode"), ($seed = $this->getProperty("level-seed")) != "" ? (int) $seed : false, $this->getProperty("server-port"), ($ip = $this->getProperty("server-ip")) != "" ? $ip : "0.0.0.0"); $this->server = new Server($this->getProperty("server-name"), $this->getProperty("gamemode"), ($seed = $this->getProperty("level-seed")) != "" ? (int) $seed : false, $this->getProperty("server-port"), ($ip = $this->getProperty("server-ip")) != "" ? $ip : "0.0.0.0");
$this->server->api = $this; $this->server->api = $this;
self::$serverRequest = $this->server; self::$serverRequest = $this->server;