workaround for hanging events after shutdown.

This commit is contained in:
gnembon committed 2021-02-10 23:35:59 -04:00
1 parent 4807e4d518
commit 9ebae27807
1 file changed
+9 -1
@@ -205,7 +205,15 @@ public class CarpetEventServer
if (callList.size() > 0) if (callList.size() > 0)
{ {
List<Value> argv = argumentSupplier.get(); // empty for onTickDone List<Value> argv = argumentSupplier.get(); // empty for onTickDone
ServerCommandSource source = cmdSourceSupplier.get(); ServerCommandSource source;
try
{
source = cmdSourceSupplier.get();
}
catch (NullPointerException noReference) // todo figure out what happens when closing.
{
return;
}
String nameCheck = perPlayerDistribution?source.getName():null; String nameCheck = perPlayerDistribution?source.getName():null;
assert argv.size() == reqArgs; assert argv.size() == reqArgs;
List<Callback> fails = new ArrayList<>(); List<Callback> fails = new ArrayList<>();