From 62f79aa905298c59c2c944ec75435d0f71a3555f Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 1 Dec 2021 10:29:25 +1100 Subject: [PATCH] SPIGOT-6822: Ensure library loader has same parent as plugin loader This behaviour may need to be revisted in future to achieve greater isolation of plugins/libraries By: md_5 --- .../src/main/java/org/bukkit/plugin/java/LibraryLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/LibraryLoader.java index 939afec1f..6d634b0ea 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/LibraryLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/LibraryLoader.java @@ -121,7 +121,7 @@ class LibraryLoader } ); } - URLClassLoader loader = new URLClassLoader( jarFiles.toArray( new URL[ jarFiles.size() ] ) ); + URLClassLoader loader = new URLClassLoader( jarFiles.toArray( new URL[ jarFiles.size() ] ), getClass().getClassLoader() ); return loader; }