mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-20 23:03:48 -07:00
Close plugin jar file on classloader close and after retrieving name for updating (#8902)
This commit is contained in:
@@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.description = description;
|
||||
this.dataFolder = dataFolder;
|
||||
this.file = file;
|
||||
- this.jar = new JarFile(file);
|
||||
+ this.jar = new JarFile(file, true, java.util.zip.ZipFile.OPEN_READ, JarFile.runtimeVersion()); // Paper - enable multi-release jars for Java 9+
|
||||
- this.jar = jarFile == null ? new JarFile(file) : jarFile; // Paper - use JarFile provided by SpigotPluginProvider
|
||||
+ this.jar = jarFile == null ? new JarFile(file, true, java.util.zip.ZipFile.OPEN_READ, JarFile.runtimeVersion()) : jarFile; // Paper - use JarFile provided by SpigotPluginProvider // Paper - enable multi-release jars for Java 9+
|
||||
this.manifest = jar.getManifest();
|
||||
this.url = file.toURI().toURL();
|
||||
this.libraryLoader = libraryLoader;
|
||||
|
Reference in New Issue
Block a user