diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/classloader/InjectedClassLoader.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/classloader/InjectedClassLoader.java index a3f0e857..fd2648bb 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/classloader/InjectedClassLoader.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/classloader/InjectedClassLoader.java @@ -38,7 +38,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; /** - * A fake classloader instance which sits in-front of a PluginClassLoader, which + * A fake classloader instance which sits in-front of a PluginClassLoader, and * attempts to load classes from it's own sources before allowing the PCL to load * the class. * 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 965532e0..9695e452 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 @@ -103,14 +103,10 @@ public class DependencyManager { dependencies.add(Dependency.JEDIS); } - // don't load slf4j if it's already present - if (classExists("org.slf4j.Logger") && classExists("org.slf4j.LoggerFactory")) { + // don't load slf4j or configurate dependencies on sponge, as they're already present + if (plugin.getServerType() == PlatformType.SPONGE) { dependencies.remove(Dependency.SLF4J_API); dependencies.remove(Dependency.SLF4J_SIMPLE); - } - - // don't load configurate dependencies on sponge - if (plugin.getServerType() == PlatformType.SPONGE) { dependencies.remove(Dependency.CONFIGURATE_CORE); dependencies.remove(Dependency.CONFIGURATE_GSON); dependencies.remove(Dependency.CONFIGURATE_YAML); @@ -195,15 +191,6 @@ public class DependencyManager { } } - private static boolean classExists(String className) { - try { - Class.forName(className); - return true; - } catch (ClassNotFoundException e) { - return false; - } - } - public static void loadUrlIntoClassLoader(URL url, ClassLoader classLoader) { if (classLoader instanceof URLClassLoader) { try {