diff --git a/pom.xml b/pom.xml index b44e6ac..e3035a2 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 pw.yumc MiaoScript - 0.21.1 + 0.21.2 502647092 diff --git a/src/main/java/pw/yumc/MiaoScript/api/MiaoScriptAPI.java b/src/main/java/pw/yumc/MiaoScript/api/MiaoScriptAPI.java index ed560b4..69d065b 100644 --- a/src/main/java/pw/yumc/MiaoScript/api/MiaoScriptAPI.java +++ b/src/main/java/pw/yumc/MiaoScript/api/MiaoScriptAPI.java @@ -8,7 +8,7 @@ import java.io.File; import java.nio.file.Paths; public class MiaoScriptAPI { - public static final String VERSION = "0.21.1"; + public static final String VERSION = "0.21.2"; private static String root; private static String libPath; private static ScriptEngine scriptEngine; diff --git a/src/main/java/pw/yumc/MiaoScript/api/loader/JarLoader.java b/src/main/java/pw/yumc/MiaoScript/api/loader/JarLoader.java index 5905d24..7e68346 100644 --- a/src/main/java/pw/yumc/MiaoScript/api/loader/JarLoader.java +++ b/src/main/java/pw/yumc/MiaoScript/api/loader/JarLoader.java @@ -25,7 +25,7 @@ public class JarLoader { private static void initReflect() { try { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); + ClassLoader loader = ClassLoader.getSystemClassLoader(); Field theUnsafe = sun.misc.Unsafe.class.getDeclaredField("theUnsafe"); theUnsafe.setAccessible(true); sun.misc.Unsafe unsafe = (sun.misc.Unsafe) theUnsafe.get(null);