Made a new interface for CNPC+ script handlers and changed callScript functions to make them more 3rd party API-friendly

This commit is contained in:
Luis C.M committed 2023-07-13 13:56:32 -05:00
1 parent d433eccef1
commit 3b0879b0db
8 files changed
+59 -25

No files matched your search

@@ -17,7 +17,7 @@ import noppes.npcs.controllers.ScriptController;
import java.util.*;
import java.util.Map.Entry;
public class ForgeDataScript implements IScriptHandler {
public class ForgeDataScript implements INpcScriptHandler {
private List<ScriptContainer> scripts = new ArrayList();
private String scriptLanguage = "ECMAScript";
public long lastInited = -1L;
@@ -60,7 +60,7 @@ public class ForgeDataScript implements IScriptHandler {
@Override
public void callScript(EnumScriptType var1, Event var2) {
callScript(var1.function, var2);
this.callScript(var1.function, var2);
}
public void callScript(String type, Event event) {