Example #1
0
 if (file_exists(\BukkitPE\PATH . ".git/refs/heads/master")) {
     //Found Git information!
     define("BukkitPE\\GIT_COMMIT", strtolower(trim(file_get_contents(\BukkitPE\PATH . ".git/refs/heads/master"))));
 } else {
     //Unknown :(
     define("BukkitPE\\GIT_COMMIT", str_repeat("00", 20));
 }
 @define("ENDIANNESS", pack("d", 1) === "?ð" ? Binary::BIG_ENDIAN : Binary::LITTLE_ENDIAN);
 @define("INT32_MASK", is_int(0xffffffff) ? 0xffffffff : -1);
 @ini_set("opcache.mmap_base", bin2hex(Utils::getRandomBytes(8, false)));
 //Fix OPCache address errors
 if (!file_exists(\BukkitPE\DATA . "server.properties") and !isset($opts["no-wizard"])) {
     new Installer();
 }
 if (\Phar::running(true) === "") {
     $logger->info("§c{--------------------====================--------------------}");
     $logger->info("§6BukkitPE - MCPE Server Software");
     $logger->info("§9- §eYou may use on production");
     $logger->info("§9- §ePlugins: Forums.BukkitPE.net/plugins (Being work on)");
     $logger->info("§9- §eSite: BukkitPE.net (Being work on)");
     $logger->info("§9- §eBugs?: https://github.com/BukkitPE/BukkitPE/issues");
     $logger->info("§9- §3BukkitPE was made by: AndreTheGamer , DelxHQ");
     $logger->info("§c{---------------------====================--------------------}");
 }
 ThreadManager::init();
 $server = new Server($autoloader, $logger, \BukkitPE\PATH, \BukkitPE\DATA, \BukkitPE\PLUGIN_PATH);
 $logger->info("Stopping other threads");
 foreach (ThreadManager::getInstance()->getAll() as $id => $thread) {
     $logger->debug("Stopping " . (new \ReflectionClass($thread))->getShortName() . " thread");
     $thread->quit();
 }