9
0
mirror of https://github.com/Auxilor/EcoArmor.git synced 2025-12-28 03:19:25 +00:00

Fixed extension effects/conditions not having their listeners registered

This commit is contained in:
Auxilor
2021-03-22 13:41:31 +00:00
parent 8a396d2fa5
commit 15428a2add

View File

@@ -49,9 +49,6 @@ public class EcoArmorPlugin extends AbstractEcoPlugin {
*/
@Override
public void enable() {
Effects.values().stream().filter(Effect::isEnabled).forEach(effect -> this.getEventManager().registerListener(effect));
Conditions.values().forEach(condition -> this.getEventManager().registerListener(condition));
this.getExtensionLoader().loadExtensions();
if (this.getExtensionLoader().getLoadedExtensions().isEmpty()) {
@@ -60,6 +57,9 @@ public class EcoArmorPlugin extends AbstractEcoPlugin {
this.getLog().info("Extensions Loaded:");
this.getExtensionLoader().getLoadedExtensions().forEach(extension -> this.getLog().info("- " + extension.getName() + " v" + extension.getVersion()));
}
Effects.values().stream().filter(Effect::isEnabled).forEach(effect -> this.getEventManager().registerListener(effect));
Conditions.values().forEach(condition -> this.getEventManager().registerListener(condition));
}
/**