mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Stop hardcoding "PocketMine-MP" everywhere
This commit is contained in:
parent
6e5759b1d1
commit
10f597cd64
@ -79,6 +79,7 @@ namespace pocketmine {
|
||||
use pocketmine\wizard\SetupWizard;
|
||||
use raklib\RakLib;
|
||||
|
||||
const NAME = "PocketMine-MP";
|
||||
const VERSION = "1.7dev";
|
||||
const API_VERSION = "3.0.0-ALPHA8";
|
||||
const CODENAME = "[REDACTED]";
|
||||
@ -446,13 +447,13 @@ namespace pocketmine {
|
||||
$errors = 0;
|
||||
|
||||
if(PHP_INT_SIZE < 8){
|
||||
$logger->critical("Running PocketMine-MP with 32-bit systems/PHP is no longer supported. Please upgrade to a 64-bit system or use a 64-bit PHP binary.");
|
||||
$logger->critical("Running " . \pocketmine\NAME . " with 32-bit systems/PHP is no longer supported. Please upgrade to a 64-bit system or use a 64-bit PHP binary.");
|
||||
$exitCode = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if(php_sapi_name() !== "cli"){
|
||||
$logger->critical("You must run PocketMine-MP using the CLI.");
|
||||
$logger->critical("You must run " . \pocketmine\NAME . " using the CLI.");
|
||||
++$errors;
|
||||
}
|
||||
|
||||
@ -484,7 +485,7 @@ namespace pocketmine {
|
||||
}
|
||||
|
||||
if(extension_loaded("xdebug")){
|
||||
$logger->warning(PHP_EOL . PHP_EOL . PHP_EOL . "\tYou are running PocketMine with xdebug enabled. This has a major impact on performance." . PHP_EOL . PHP_EOL);
|
||||
$logger->warning(PHP_EOL . PHP_EOL . PHP_EOL . "\tYou are running " . \pocketmine\NAME . " with xdebug enabled. This has a major impact on performance." . PHP_EOL . PHP_EOL);
|
||||
}
|
||||
|
||||
$extensions = [
|
||||
@ -546,7 +547,7 @@ namespace pocketmine {
|
||||
|
||||
|
||||
if(\Phar::running(true) === ""){
|
||||
$logger->warning("Non-packaged PocketMine-MP installation detected. Consider using a phar in production for better performance.");
|
||||
$logger->warning("Non-packaged " . \pocketmine\NAME . " installation detected. Consider using a phar in production for better performance.");
|
||||
}
|
||||
|
||||
ThreadManager::init();
|
||||
|
@ -276,7 +276,7 @@ class Server{
|
||||
* @return string
|
||||
*/
|
||||
public function getName() : string{
|
||||
return "PocketMine-MP";
|
||||
return \pocketmine\NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -454,7 +454,7 @@ class Utils{
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_CONNECTTIMEOUT_MS => (int) ($timeout * 1000),
|
||||
CURLOPT_TIMEOUT_MS => (int) ($timeout * 1000),
|
||||
CURLOPT_HTTPHEADER => array_merge(["User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 PocketMine-MP"], $extraHeaders),
|
||||
CURLOPT_HTTPHEADER => array_merge(["User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 " . \pocketmine\NAME], $extraHeaders),
|
||||
CURLOPT_HEADER => true
|
||||
]);
|
||||
try{
|
||||
|
@ -46,7 +46,7 @@ class SetupWizard{
|
||||
}
|
||||
|
||||
public function run() : bool{
|
||||
$this->message("PocketMine-MP set-up wizard");
|
||||
$this->message(\pocketmine\NAME . " set-up wizard");
|
||||
|
||||
$langs = BaseLang::getLanguageList();
|
||||
if(empty($langs)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user