mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Fixed Global NPC script tabs not working on the server-side after being errored.
This commit is contained in:
1 parent
a82a06fe4d
commit
8d52e9356c
2 files changed
+36
-41
No files matched your search
@@ -61,21 +61,16 @@ public class ForgeDataScript implements IScriptHandler {
|
||||
|
||||
public void callScript(String type, Event event) {
|
||||
if(this.isEnabled()) {
|
||||
//Minecraft.getMinecraft().func_152344_a(() -> {
|
||||
if (ScriptController.Instance.lastLoaded > this.lastInited) {
|
||||
this.lastInited = ScriptController.Instance.lastLoaded;
|
||||
if (!type.equals("init")) {
|
||||
EventHooks.onForgeInit(this);
|
||||
}
|
||||
if (ScriptController.Instance.lastLoaded > this.lastInited) {
|
||||
this.lastInited = ScriptController.Instance.lastLoaded;
|
||||
if (!type.equals("init")) {
|
||||
EventHooks.onForgeInit(this);
|
||||
}
|
||||
}
|
||||
|
||||
Iterator var3 = this.scripts.iterator();
|
||||
|
||||
while(var3.hasNext()) {
|
||||
ScriptContainer script = (ScriptContainer)var3.next();
|
||||
script.run(type, event);
|
||||
}
|
||||
//});
|
||||
for (ScriptContainer script : this.scripts) {
|
||||
script.run(type, event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user