Fixed #1979: logger colours don't show on other threads when classes are not inherited

This commit is contained in:
Dylan K. Taylor 2018-05-09 18:07:12 +01:00
parent b96adda14d
commit dd11bcaf11
2 changed files with 3 additions and 2 deletions

View File

@ -232,8 +232,7 @@ namespace pocketmine {
define('pocketmine\DATA', isset($opts["data"]) ? $opts["data"] . DIRECTORY_SEPARATOR : \realpath(\getcwd()) . DIRECTORY_SEPARATOR);
define('pocketmine\PLUGIN_PATH', isset($opts["plugins"]) ? $opts["plugins"] . DIRECTORY_SEPARATOR : \realpath(\getcwd()) . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR);
Terminal::init();
//hasFormattingCodes() initializes static colour codes on the fly
define('pocketmine\ANSI', Terminal::hasFormattingCodes());
if(!file_exists(\pocketmine\DATA)){

View File

@ -67,6 +67,8 @@ abstract class Terminal{
));
fclose($stdout);
}
self::init();
}
return self::$formattingCodes;