aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0818-Fix-player-kick-on-shutdown.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0818-Fix-player-kick-on-shutdown.patch')
-rw-r--r--patches/server/0818-Fix-player-kick-on-shutdown.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0818-Fix-player-kick-on-shutdown.patch b/patches/server/0818-Fix-player-kick-on-shutdown.patch
index 0c36dc9398..6b694a6abe 100644
--- a/patches/server/0818-Fix-player-kick-on-shutdown.patch
+++ b/patches/server/0818-Fix-player-kick-on-shutdown.patch
@@ -9,7 +9,7 @@ also check if all packets are ignored during the shutdown process.
See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable)
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-index 7de24c39b460e43d27839b3821e67213508ece81..454d0187ff8370a0d99cca051ee0a8c50b39cfb7 100644
+index b7ffab0284b0bccd79775b8d03c8b2e088f91d1d..4202c48ad8f8e85ef46d1bd446ab28f3f4b083d1 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -26,7 +26,7 @@ public class PacketUtils {
@@ -18,6 +18,6 @@ index 7de24c39b460e43d27839b3821e67213508ece81..454d0187ff8370a0d99cca051ee0a8c5
if (!engine.isSameThread()) {
- engine.executeIfPossible(() -> {
+ engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown
- if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
+ if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
if (listener.shouldHandleMessage(packet)) {
co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings