Fixed can't find sources when PocketMine.php is run from anywhere other than the repository root

This commit is contained in:
Dylan K. Taylor 2017-09-09 11:22:44 +01:00
parent f1ccee505b
commit c569f55933

View File

@ -120,7 +120,7 @@ namespace pocketmine {
if(\Phar::running(true) !== ""){ if(\Phar::running(true) !== ""){
define('pocketmine\PATH', \Phar::running(true) . "/"); define('pocketmine\PATH', \Phar::running(true) . "/");
}else{ }else{
define('pocketmine\PATH', realpath(getcwd()) . DIRECTORY_SEPARATOR); define('pocketmine\PATH', dirname(__FILE__, 3) . DIRECTORY_SEPARATOR);
} }
$requiredSplVer = "0.0.1"; $requiredSplVer = "0.0.1";