From a9ed4686dd6b0e38525b1da4538c6abb5337239c Mon Sep 17 00:00:00 2001 From: Luck Date: Tue, 19 Sep 2017 22:13:02 +0100 Subject: [PATCH] Avoid loading slf4j when running on Sponge --- .../luckperms/common/dependencies/DependencyManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java index a841612e..751b2c32 100644 --- a/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/dependencies/DependencyManager.java @@ -31,6 +31,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; +import me.lucko.luckperms.api.PlatformType; import me.lucko.luckperms.common.config.ConfigKeys; import me.lucko.luckperms.common.plugin.LuckPermsPlugin; import me.lucko.luckperms.common.storage.StorageType; @@ -84,6 +85,12 @@ public class DependencyManager { dependencies.add(Dependency.JEDIS); } + // don't load slf4j on sponge. + if (plugin.getServerType() == PlatformType.SPONGE) { + dependencies.remove(Dependency.SLF4J_API); + dependencies.remove(Dependency.SLF4J_SIMPLE); + } + loadDependencies(plugin, dependencies); }