summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/plugin/java/PluginClassLoader.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 3be56341..9fc6bd77 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -116,10 +116,14 @@ final class PluginClassLoader extends URLClassLoader {
CodeSource source = new CodeSource(url, signers);
result = defineClass(name, classBytes, 0, classBytes.length, source);
+ }
+
+ if (result == null) {
+ result = super.findClass(name);
+ }
+ if (result != null) {
loader.setClass(name, result);
- } else {
- throw new ClassNotFoundException(name);
}
}