From 438591bd75a64ebd70306775003698b362c8ab9b Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 3 Jan 2015 16:38:36 +0100 Subject: [PATCH] API 1.11.0, fixed phar check --- src/pocketmine/PocketMine.php | 4 ++-- src/pocketmine/network/RakLibInterface.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 9a5188ef8..f954bca9b 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -71,7 +71,7 @@ namespace pocketmine { use pocketmine\wizard\Installer; const VERSION = "1.4.1dev"; - const API_VERSION = "1.10.0"; + const API_VERSION = "1.11.0"; const CODENAME = "絶好(Zekkou)ケーキ(Cake)"; const MINECRAFT_VERSION = "v0.10.4 alpha"; @@ -434,7 +434,7 @@ namespace pocketmine { new Installer(); } - if(substr(__FILE__, 0, 7) !== "phar://"){ + if(\Phar::running(true) !== ""){ $logger->warning("Non-packaged PocketMine-MP installation detected, do not use on production."); } diff --git a/src/pocketmine/network/RakLibInterface.php b/src/pocketmine/network/RakLibInterface.php index ec5d01441..a499fa6c0 100644 --- a/src/pocketmine/network/RakLibInterface.php +++ b/src/pocketmine/network/RakLibInterface.php @@ -171,7 +171,7 @@ class RakLibInterface implements ServerInstance, SourceInterface{ $ev = new PlayerCreationEvent($this, Player::class, Player::class, null, $address, $port); $this->server->getPluginManager()->callEvent($ev); $class = $ev->getPlayerClass(); - + $player = new $class($this, $ev->getClientId(), $ev->getAddress(), $ev->getPort()); $this->players[$identifier] = $player; $this->identifiersACK[$identifier] = 0;