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

@@ -147,7 +147,7 @@ public class ScriptContainer {
}
public void run(String type, Object event) {
if(errored || !hasCode() || unknownFunctions.contains(type) || !ConfigScript.ScriptingEnabled)
if(!ConfigScript.ScriptingEnabled || errored || !hasCode() || unknownFunctions.contains(type))
return;
this.setEngine(handler.getLanguage());