Eliminate more hard dependencies on MainLogger

This commit is contained in:
Dylan K. Taylor
2018-06-04 16:52:03 +01:00
parent 35eaf38ca1
commit dce8ed9dd1
3 changed files with 5 additions and 8 deletions

View File

@ -35,7 +35,6 @@ use pocketmine\permission\Permission;
use pocketmine\Server;
use pocketmine\timings\Timings;
use pocketmine\timings\TimingsHandler;
use pocketmine\utils\MainLogger;
use pocketmine\utils\Utils;
/**
@ -759,7 +758,7 @@ class PluginManager{
$isHandler = count($parameters) === 1 && $parameters[0]->getClass() instanceof \ReflectionClass && is_subclass_of($parameters[0]->getClass()->getName(), Event::class);
}catch(\ReflectionException $e){
if(isset($tags["softDepend"]) && !isset($this->plugins[$tags["softDepend"]])){
MainLogger::getLogger()->debug("Not registering @softDepend listener " . get_class($listener) . "::" . $method->getName() . "(" . $parameters[0]->getType()->getName() . ") because plugin \"" . $tags["softDepend"] . "\" not found");
$this->server->getLogger()->debug("Not registering @softDepend listener " . get_class($listener) . "::" . $method->getName() . "(" . $parameters[0]->getType()->getName() . ") because plugin \"" . $tags["softDepend"] . "\" not found");
continue;
}