diff --git a/src/CoreConstants.php b/src/CoreConstants.php index bf88306f1..63913e941 100644 --- a/src/CoreConstants.php +++ b/src/CoreConstants.php @@ -35,3 +35,4 @@ define('pocketmine\_CORE_CONSTANTS_INCLUDED', true); define('pocketmine\PATH', dirname(__DIR__) . '/'); define('pocketmine\RESOURCE_PATH', dirname(__DIR__) . '/resources/'); +define('pocketmine\COMPOSER_AUTOLOADER_PATH', dirname(__DIR__) . '/vendor/autoload.php'); diff --git a/src/PocketMine.php b/src/PocketMine.php index afac6fd8d..88029b5df 100644 --- a/src/PocketMine.php +++ b/src/PocketMine.php @@ -214,20 +214,13 @@ JIT_WARNING error_reporting(-1); set_ini_entries(); - $opts = getopt("", ["bootstrap:"]); - if(isset($opts["bootstrap"])){ - $bootstrap = ($real = realpath($opts["bootstrap"])) !== false ? $real : $opts["bootstrap"]; - }else{ - $bootstrap = dirname(__FILE__, 2) . '/vendor/autoload.php'; - } - - if($bootstrap === false or !is_file($bootstrap)){ + $bootstrap = dirname(__FILE__, 2) . '/vendor/autoload.php'; + if(!is_file($bootstrap)){ critical_error("Composer autoloader not found at " . $bootstrap); critical_error("Please install/update Composer dependencies or use provided builds."); exit(1); } - define('pocketmine\COMPOSER_AUTOLOADER_PATH', $bootstrap); - require_once(\pocketmine\COMPOSER_AUTOLOADER_PATH); + require_once($bootstrap); $composerGitHash = InstalledVersions::getReference('pocketmine/pocketmine-mp'); if($composerGitHash !== null){