Skip to content

Commit

Permalink
Forcing the usage of the ClassLoader from AddonLoader.
Browse files Browse the repository at this point in the history
  • Loading branch information
DxsSucuk committed Jan 3, 2024
1 parent 511a1b8 commit 64fd8fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/de/presti/ree6/addons/AddonLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static Addon loadAddon(String fileName) throws IOException {
File addonFile = new File("addons/" + fileName);
AddonInterface addonInterface = null;
// Try loading the Class with a URL Class Loader.
try (URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{addonFile.toURI().toURL()})) {
try (URLClassLoader urlClassLoader = new URLClassLoader(new URL[]{addonFile.toURI().toURL()}, AddonLoader.class.getClassLoader())) {

// Get the Addon Class.
Class<?> addonClass = getClass(urlClassLoader, classPath);
Expand Down

0 comments on commit 64fd8fa

Please sign in to comment.