diff options
author | md_5 <git@md-5.net> | 2017-12-28 20:29:58 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-12-28 20:29:58 +1100 |
commit | 20971610daa5cbe1685ac9ba0fa93525e7158048 (patch) | |
tree | dd29ea7ffbf05865c668b0fa763562508430a20f /src/main | |
parent | c29791a82d9350af40164b501f6ca26d00e2ccba (diff) | |
download | bukkit-20971610daa5cbe1685ac9ba0fa93525e7158048.tar bukkit-20971610daa5cbe1685ac9ba0fa93525e7158048.tar.gz bukkit-20971610daa5cbe1685ac9ba0fa93525e7158048.tar.lz bukkit-20971610daa5cbe1685ac9ba0fa93525e7158048.tar.xz bukkit-20971610daa5cbe1685ac9ba0fa93525e7158048.zip |
SPIGOT-3721: Plugins without manifests no longer load
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 8 |
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 205468cf..9fc6bd77 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -44,7 +44,7 @@ final class PluginClassLoader extends URLClassLoader { this.description = description; this.dataFolder = dataFolder; this.file = file; - this.jar = new JarFile(file, true); + this.jar = new JarFile(file); this.manifest = jar.getManifest(); this.url = file.toURI().toURL(); @@ -104,7 +104,11 @@ final class PluginClassLoader extends URLClassLoader { if (dot != -1) { String pkgName = name.substring(0, dot); if (getPackage(pkgName) == null) { - definePackage(pkgName, manifest, url); + if (manifest != null) { + definePackage(pkgName, manifest, url); + } else { + definePackage(pkgName, null, null, null, null, null, null, null); + } } } |