Don't bother loading test classes (#217)

This commit is contained in:
Luck 2017-03-25 11:38:02 +00:00
parent eecbfe04db
commit e4bfe09882
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -101,7 +101,7 @@ public class DependencyManager {
// Load classes.
for (Map.Entry<Dependency, File> e : toLoad) {
try {
loadJar(plugin, e.getValue(), e.getKey().getTestClass());
loadJar(plugin, e.getValue());
} catch (Throwable e1) {
plugin.getLog().severe("Failed to load jar for dependency " + e.getKey().name());
e1.printStackTrace();
@ -132,7 +132,7 @@ public class DependencyManager {
}
}
private static void loadJar(LuckPermsPlugin plugin, File file, String baseClass) throws Exception {
private static void loadJar(LuckPermsPlugin plugin, File file) throws Exception {
URLClassLoader classLoader = (URLClassLoader) plugin.getClass().getClassLoader();
if (plugin.getServerType() != PlatformType.SPONGE && !plugin.getServerName().equals("KCauldron")) {
@ -140,7 +140,6 @@ public class DependencyManager {
}
ADD_URL_METHOD.invoke(classLoader, file.toURI().toURL());
classLoader.loadClass(baseClass).newInstance(); // Load a test class
}
}