mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +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"
|
"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);
|
$this->forceLanguage = (bool) $this->getProperty("settings.force-language", false);
|
||||||
$selectedLang = $this->getConfigString("language", $this->getProperty("settings.language", Language::FALLBACK_LANGUAGE));
|
$selectedLang = $this->getConfigString("language", $this->getProperty("settings.language", Language::FALLBACK_LANGUAGE));
|
||||||
@ -1073,10 +1076,6 @@ class Server{
|
|||||||
|
|
||||||
ini_set('assert.exception', '1');
|
ini_set('assert.exception', '1');
|
||||||
|
|
||||||
if($this->logger instanceof MainLogger){
|
|
||||||
$this->logger->setLogDebug(\pocketmine\DEBUG > 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->memoryManager = new MemoryManager($this);
|
$this->memoryManager = new MemoryManager($this);
|
||||||
|
|
||||||
$this->logger->info($this->getLanguage()->translateString("pocketmine.server.start", [TextFormat::AQUA . $this->getVersion() . TextFormat::RESET]));
|
$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);
|
$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));
|
define("BOOTUP_RANDOM", random_bytes(16));
|
||||||
$this->serverID = Utils::getMachineUniqueId($this->getIp() . $this->getPort());
|
$this->serverID = Utils::getMachineUniqueId($this->getIp() . $this->getPort());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user