added startup and shutdown events. fixes #586

This commit is contained in:
gnembon committed 2020-12-07 01:11:55 -04:00
1 parent e8a6b8936f
commit 522d971688
4 files changed
+35 -3

No files matched your search

@@ -127,7 +127,7 @@ public class CarpetScriptServer
addScriptHost(server.getCommandSource(), moduleName, null, true, true, false);
}
}
CarpetEventServer.Event.START.onTick();
}
public Module getModule(String name, boolean allowLibraries)
@@ -489,6 +489,7 @@ public class CarpetScriptServer
public void onClose()
{
CarpetEventServer.Event.SHUTDOWN.onTick();
for (ScriptHost host : modules.values())
{
host.onClose();