diff --git a/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java b/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java index 0b6420051..4153fd5ad 100644 --- a/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java +++ b/src/main/java/dan200/computercraft/shared/computer/core/ServerComputer.java @@ -191,6 +191,10 @@ public void sendTerminalState( Player player ) public void broadcastDelete() { + // We could be in the process of shutting down the server, so we can't send packets in this case. + MinecraftServer server = GameInstanceUtils.getServer(); + if( server == null || server.isStopped() ) return; + // Send deletion to client NetworkHandler.sendToAllPlayers( new ComputerDeletedClientMessage( getInstanceID() ) ); }