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

@ -25,7 +25,6 @@ declare(strict_types=1);
namespace pocketmine\resourcepacks;
use pocketmine\utils\Config;
use pocketmine\utils\MainLogger;
class ResourcePackManager{
@ -42,13 +41,12 @@ class ResourcePackManager{
private $uuidList = [];
/**
* @param string $path Path to resource-packs directory.
* @param string $path Path to resource-packs directory.
* @param \Logger $logger
*/
public function __construct(string $path){
public function __construct(string $path, \Logger $logger){
$this->path = $path;
$logger = MainLogger::getLogger();
if(!file_exists($this->path)){
$logger->debug("Resource packs path $path does not exist, creating directory");
mkdir($this->path);