. <-- descriptive commit ftw!

This commit is contained in:
Shoghi Cervantes 2015-08-10 23:39:32 +02:00
parent b47cebb1d5
commit 244cef3b00
2 changed files with 13 additions and 14 deletions

View File

@ -91,6 +91,12 @@ namespace pocketmine {
@define("pocketmine\\PATH", \getcwd() . DIRECTORY_SEPARATOR);
}
if(version_compare("7.0", PHP_VERSION) > 0){
echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL;
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
exit(1);
}
if(!extension_loaded("pthreads")){
echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL;
echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL;
@ -127,12 +133,8 @@ namespace pocketmine {
define("pocketmine\\DATA", isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR);
define("pocketmine\\PLUGIN_PATH", isset($opts["plugins"]) ? $opts["plugins"] . DIRECTORY_SEPARATOR : \getcwd() . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
echo "HAHA";
Terminal::init();
echo "HAHA";
define("pocketmine\\ANSI", Terminal::hasFormattingCodes());
if(!file_exists(\pocketmine\DATA)){
@ -141,7 +143,9 @@ namespace pocketmine {
//Logger has a dependency on timezone, so we'll set it to UTC until we can get the actual timezone.
date_default_timezone_set("UTC");
var_dump("LOAD LOGGER");
$logger = new MainLogger(\pocketmine\DATA . "server.log", \pocketmine\ANSI);
var_dump("LOGGER LOADED");
if(!ini_get("date.timezone")){
if(($timezone = detect_system_timezone()) and date_default_timezone_set($timezone)){
@ -376,11 +380,6 @@ namespace pocketmine {
$errors = 0;
if(version_compare("5.6.0", PHP_VERSION) > 0){
$logger->critical("You must use PHP >= 5.6");
++$errors;
}
if(php_sapi_name() !== "cli"){
$logger->critical("You must run PocketMine-MP using the CLI.");
++$errors;

View File

@ -2,11 +2,11 @@
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -15,7 +15,7 @@
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*
*/