Reformat and clean up "scripting" package

This commit is contained in:
P0nk
2021-09-09 23:26:45 +02:00
parent 9b1dc76854
commit d389665bd7
18 changed files with 3636 additions and 3568 deletions

View File

@@ -54,7 +54,7 @@ public class MapScriptManager extends AbstractScriptManager {
chr.enteredScript(mapScriptPath, mapid);
}
}
Invocable iv = scripts.get(mapScriptPath);
if (iv != null) {
try {
@@ -64,13 +64,13 @@ public class MapScriptManager extends AbstractScriptManager {
e.printStackTrace();
}
}
try {
iv = (Invocable) getInvocableScriptEngine("map/" + mapScriptPath + ".js");
if (iv == null) {
return false;
}
scripts.put(mapScriptPath, iv);
iv.invokeFunction("start", new MapScriptMethods(c));
return true;