From 420c962cebb35deaeba35e3ecba6bf59182976bf Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 12 Jan 2020 10:50:22 +1100 Subject: [PATCH] SPIGOT-5477: Server not shutting down By: md_5 --- paper-server/nms-patches/PlayerConnectionUtils.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/paper-server/nms-patches/PlayerConnectionUtils.patch b/paper-server/nms-patches/PlayerConnectionUtils.patch index d367e3727..ac3390271 100644 --- a/paper-server/nms-patches/PlayerConnectionUtils.patch +++ b/paper-server/nms-patches/PlayerConnectionUtils.patch @@ -8,3 +8,14 @@ if (t0.a().isConnected()) { packet.a(t0); } else { +@@ -23,5 +24,10 @@ + }); + throw CancelledPacketHandleException.INSTANCE; + } ++ // CraftBukkit start - SPIGOT-5477, MC-142590 ++ else if (MinecraftServer.getServer().hasStopped() || (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect)) { ++ throw CancelledPacketHandleException.INSTANCE; ++ } ++ // CraftBukkit end + } + }