prevent events to be called when script server is gone.
This commit is contained in:
1 parent
566b6c394b
commit
bd689b418a
2 files changed
+3
-1
No files matched your search
@@ -469,9 +469,10 @@ public class CarpetScriptServer
|
||||
public void onClose()
|
||||
{
|
||||
CarpetEventServer.Event.SHUTDOWN.onTick();
|
||||
for (ScriptHost host : modules.values())
|
||||
for (CarpetScriptHost host : modules.values())
|
||||
{
|
||||
host.onClose();
|
||||
events.removeAllHostEvents(host);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user