From 68600d7d00e008d48384c3bfd3ad93cb91a099a9 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Sun, 27 Nov 2022 23:56:38 -0600 Subject: [PATCH] Added additional GraalJS flags --- src/main/java/noppes/npcs/controllers/ScriptContainer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/noppes/npcs/controllers/ScriptContainer.java b/src/main/java/noppes/npcs/controllers/ScriptContainer.java index 0fb047b7b..9fdc120e7 100644 --- a/src/main/java/noppes/npcs/controllers/ScriptContainer.java +++ b/src/main/java/noppes/npcs/controllers/ScriptContainer.java @@ -216,6 +216,10 @@ public class ScriptContainer { engine.getBindings(ScriptContext.ENGINE_SCOPE).put("polyglot.js.allowHostClassLookup", (Predicate) s -> true); engine.getBindings(ScriptContext.ENGINE_SCOPE).put("polyglot.js.allowHostClassLoading", true); engine.getBindings(ScriptContext.ENGINE_SCOPE).put("polyglot.js.allowNativeAccess", true); + System.setProperty("polyglot.js.nashorn-compat", "true"); + System.setProperty("polyglot.js.scripting", "true"); + System.setProperty("polyglot.js.scripting", "true"); + System.setProperty("polyglot.js.syntax-extensions", "true"); this.engine = engine; currentScriptLanguage = scriptLanguage;