feat: support BungeeCord at JDK17
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
ebc03b6164
commit
14cc05e923
4
pom.xml
4
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>pw.yumc</groupId>
|
||||
<artifactId>MiaoScript</artifactId>
|
||||
<version>0.23.0</version>
|
||||
<version>0.23.1</version>
|
||||
<developers>
|
||||
<developer>
|
||||
<id>502647092</id>
|
||||
@ -50,6 +50,8 @@
|
||||
<properties>
|
||||
<env.GIT_COMMIT>DEV</env.GIT_COMMIT>
|
||||
<update.changes>
|
||||
§622-06-21 §afeat: 兼容 1.7.10-1.19 版本;
|
||||
§afeat: 兼容 JDK17 BungeeCord;
|
||||
§622-05-25 §afeat: 兼容 1.7.10-1.18.2 版本;
|
||||
§622-05-21 §afeat: 优化 框架加载逻辑;
|
||||
§622-05-20 §afeat: 调整 require 主包逻辑;
|
||||
|
@ -8,7 +8,7 @@ import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class MiaoScriptAPI {
|
||||
public static final String VERSION = "0.23.0";
|
||||
public static final String VERSION = "0.23.1";
|
||||
private static String root;
|
||||
private static String libPath;
|
||||
private static ScriptEngine scriptEngine;
|
||||
|
@ -35,7 +35,11 @@ public class MiaoScriptEngine implements ScriptEngine, Invocable {
|
||||
}
|
||||
|
||||
private void loadGraalJS(String engineRoot) {
|
||||
this.engine = this.parentLoadNetworkNashorn(engineRoot);
|
||||
try {
|
||||
this.engine = this.parentLoadNetworkNashorn(engineRoot);
|
||||
} catch (Throwable ex) {
|
||||
this.engine = this.loadNetworkNashorn(engineRoot);
|
||||
}
|
||||
if (this.engine == null) {
|
||||
this.engine = this.loadNetworkGraalJS(engineRoot);
|
||||
}
|
||||
@ -56,7 +60,7 @@ public class MiaoScriptEngine implements ScriptEngine, Invocable {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
try {
|
||||
if (this.engine == null && engineRoot != null) {
|
||||
if (this.engine == null) {
|
||||
this.engine = this.loadNetworkNashorn(engineRoot);
|
||||
}
|
||||
} catch (final Throwable ex) {
|
||||
|
Loading…
Reference in New Issue
Block a user