From 42fe618b6b730ff5bcbf7e8c7f4d7233be8a9dde Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 24 Mar 2017 19:36:54 +0100 Subject: [PATCH] Remove use of isDataaseInitialized for MConf and EngineChat --- src/com/massivecraft/factions/entity/MConf.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 36466f64..706e20b4 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -44,10 +44,14 @@ public class MConf extends Entity { super.load(that); - if (!Factions.get().isDatabaseInitialized()) return this; - - EngineChat.get().setActive(false); - EngineChat.get().setActive(true); + // Reactivate EngineChat if currently active. + // This way some event listeners are registered with the correct priority based on the config. + EngineChat engine = EngineChat.get(); + if (engine.isActive()) + { + engine.setActive(false); + engine.setActive(true); + } return this; }