Avoid loading slf4j when running on Sponge

This commit is contained in:
Luck 2017-09-19 22:13:02 +01:00
parent 5b742eb5b2
commit a9ed4686dd
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -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);
}