Renamed NPCs button on GUI, added configs for enabling player, forge, NPC, and all scripts.

This commit is contained in:
Luis C.M committed 2022-03-23 17:42:35 -05:00
1 parent 33378fba59
commit 9a244ca2fe
6 files changed
+25 -4

No files matched your search

@@ -110,10 +110,16 @@ public class ScriptContainer {
}
public void run(EnumScriptType type, Event event) {
if(!CustomNpcs.ScriptingEnabled)
return;
this.run((String)type.function, (Object)event);
}
public void run(String type, Object event) {
if(!CustomNpcs.ScriptingEnabled)
return;
if (!this.errored && this.hasCode() && !this.unknownFunctions.contains(type)) {
this.setEngine(this.handler.getLanguage());
if (this.engine != null) {