mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 04:17:36 +00:00
Added config to optionally enable/disable the ECMA6 Javascript standard in scripts.
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user