Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed May 6, 2020
1 parent 55e8f3c commit 9709c15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/matcracker/BedcoreProtect/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function reloadPlugin(): bool

if ($this->configParser->isValidConfig()) {
foreach ($this->events as $event) {
$event->setParsedConfig($this->configParser);
$event->config = $this->configParser;
}
$this->baseLang = new BaseLang($this->configParser->getLanguage(), $this->getFile() . 'resources/languages/');
return true;
Expand Down
11 changes: 3 additions & 8 deletions src/matcracker/BedcoreProtect/listeners/BedcoreListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

abstract class BedcoreListener implements Listener
{
/** @var ConfigParser */
public $config;
/** @var Main */
protected $plugin;
/** @var ConfigParser */
protected $config;
/** @var Air */
protected $air;
/** @var PluginQueries */
Expand All @@ -50,7 +50,7 @@ abstract class BedcoreListener implements Listener
public function __construct(Main $plugin)
{
$this->plugin = $plugin;
$this->setParsedConfig($plugin->getParsedConfig());
$this->config = $plugin->getParsedConfig();

$this->air = new Air();

Expand All @@ -59,9 +59,4 @@ public function __construct(Main $plugin)
$this->entitiesQueries = $plugin->getDatabase()->getQueryManager()->getEntitiesQueries();
$this->inventoriesQueries = $plugin->getDatabase()->getQueryManager()->getInventoriesQueries();
}

final public function setParsedConfig(ConfigParser $config): void
{
$this->config = $config;
}
}

0 comments on commit 9709c15

Please sign in to comment.