Added config to optionally enable/disable the ECMA6 Javascript standard in scripts.

This commit is contained in:
Luis C.M committed 2022-11-25 21:33:43 -06:00
1 parent b7eb70dd31
commit ed0290217f
2 files changed
+6 -1

No files matched your search

@@ -209,7 +209,7 @@ public class ScriptContainer {
public void setEngine(String scriptLanguage) {
if(currentScriptLanguage != null && currentScriptLanguage.equals(scriptLanguage))
return;
if (scriptLanguage.equals("ECMAScript")) {
if (CustomNpcs.ScriptingECMA6 && scriptLanguage.equals("ECMAScript")) {
System.setProperty("nashorn.args", "--language=es6");
}
engine = ScriptController.Instance.getEngineByName(scriptLanguage.toLowerCase());