Skip to content

Commit

Permalink
fix prooblem wth config
Browse files Browse the repository at this point in the history
  • Loading branch information
ShockedPlot7560 committed Apr 7, 2022
1 parent 2630957 commit c1ba50f
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions src/_64FF00/PureChat/PureChat.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,32 +304,11 @@ private function fixOldData($string) {
}

private function loadFactionsPlugin() {
$factionsPluginName = $this->config->get("default-factions-plugin");

if ($factionsPluginName === null) {
$this->getLogger()->notice("No valid factions plugin in default-factions-plugin node was found. Disabling factions plugin support.");
} else {
switch (strtolower($factionsPluginName)) {
case 'factionmaster':

if ($this->getServer()->getPluginManager()->getPlugin("FactionMaster") !== null) {
$this->factionsAPI = new FactionMaster();

$this->getLogger()->notice("FactionMaster support enabled.");

break;
}

$this->getLogger()->notice("No valid factions plugin in default-factions-plugin node was found. Disabling factions plugin support.");

break;
default:

$this->getLogger()->notice("No valid factions plugin in default-factions-plugin node was found. Disabling factions plugin support.");

break;
}
if ($this->getServer()->getPluginManager()->getPlugin("FactionMaster") !== null) {
$this->factionsAPI = new FactionMaster();
$this->getLogger()->notice("FactionMaster support enabled.");
}
$this->getLogger()->notice("No valid FactionMaster instance found, to enable FactionMaster support, please install FactionMaster.");
}

/*
Expand Down

0 comments on commit c1ba50f

Please sign in to comment.