SPIGOT-3721: Plugins without manifests no longer load
By: md_5 <git@md-5.net>
This commit is contained in:
parent
1e918108e3
commit
a36a08cdd0
1 changed files with 6 additions and 2 deletions
|
@ -44,7 +44,7 @@ final class PluginClassLoader extends URLClassLoader {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
this.dataFolder = dataFolder;
|
this.dataFolder = dataFolder;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.jar = new JarFile(file, true);
|
this.jar = new JarFile(file);
|
||||||
this.manifest = jar.getManifest();
|
this.manifest = jar.getManifest();
|
||||||
this.url = file.toURI().toURL();
|
this.url = file.toURI().toURL();
|
||||||
|
|
||||||
|
@ -104,7 +104,11 @@ final class PluginClassLoader extends URLClassLoader {
|
||||||
if (dot != -1) {
|
if (dot != -1) {
|
||||||
String pkgName = name.substring(0, dot);
|
String pkgName = name.substring(0, dot);
|
||||||
if (getPackage(pkgName) == null) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue