From c1ba50fd86309e8cf6aff02a1f7a9f7ac2c91ca3 Mon Sep 17 00:00:00 2001 From: ShockedPlot7560 <66992287+ShockedPlot7560@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:51:54 +0200 Subject: [PATCH] fix prooblem wth config --- src/_64FF00/PureChat/PureChat.php | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/_64FF00/PureChat/PureChat.php b/src/_64FF00/PureChat/PureChat.php index b8db212..a1434d6 100644 --- a/src/_64FF00/PureChat/PureChat.php +++ b/src/_64FF00/PureChat/PureChat.php @@ -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."); } /*