mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Server: get rid of \pocketmine\DEBUG
This commit is contained in:
parent
d1a8bef1e6
commit
2bcb720668
@ -1034,7 +1034,10 @@ class Server{
|
||||
"language" => "eng"
|
||||
]);
|
||||
|
||||
define('pocketmine\DEBUG', (int) $this->getProperty("debug.level", 1));
|
||||
$debugLogLevel = (int) $this->getProperty("debug.level", 1);
|
||||
if($this->logger instanceof MainLogger){
|
||||
$this->logger->setLogDebug($debugLogLevel > 1);
|
||||
}
|
||||
|
||||
$this->forceLanguage = (bool) $this->getProperty("settings.force-language", false);
|
||||
$selectedLang = $this->getConfigString("language", $this->getProperty("settings.language", Language::FALLBACK_LANGUAGE));
|
||||
@ -1073,10 +1076,6 @@ class Server{
|
||||
|
||||
ini_set('assert.exception', '1');
|
||||
|
||||
if($this->logger instanceof MainLogger){
|
||||
$this->logger->setLogDebug(\pocketmine\DEBUG > 1);
|
||||
}
|
||||
|
||||
$this->memoryManager = new MemoryManager($this);
|
||||
|
||||
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.start", [TextFormat::AQUA . $this->getVersion() . TextFormat::RESET]));
|
||||
@ -1139,9 +1138,7 @@ class Server{
|
||||
$this->setConfigInt("difficulty", World::DIFFICULTY_HARD);
|
||||
}
|
||||
|
||||
if(\pocketmine\DEBUG >= 0){
|
||||
@cli_set_process_title($this->getName() . " " . $this->getPocketMineVersion());
|
||||
}
|
||||
@cli_set_process_title($this->getName() . " " . $this->getPocketMineVersion());
|
||||
|
||||
define("BOOTUP_RANDOM", random_bytes(16));
|
||||
$this->serverID = Utils::getMachineUniqueId($this->getIp() . $this->getPort());
|
||||
|
Loading…
x
Reference in New Issue
Block a user