Paper/paper-server/nms-patches/net/minecraft/network/protocol/PlayerConnectionUtils.patch
CraftBukkit/Spigot 064818a555 SPIGOT-7587: Remove fixes for now-resolved MC-142590 and MC-109346
By: Doc <nachito94@msn.com>
2024-03-10 09:20:54 +11:00

23 lines
1.1 KiB
Diff

--- a/net/minecraft/network/protocol/PlayerConnectionUtils.java
+++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java
@@ -9,6 +9,11 @@
import net.minecraft.util.thread.IAsyncTaskHandler;
import org.slf4j.Logger;
+// CraftBukkit start
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.network.ServerCommonPacketListenerImpl;
+// CraftBukkit end
+
public class PlayerConnectionUtils {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -22,6 +27,7 @@
public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isSameThread()) {
iasynctaskhandler.executeIfPossible(() -> {
+ if (t0 instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
if (t0.shouldHandleMessage(packet)) {
try {
packet.handle(t0);