3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-21 05:50:05 +01:00
Paper/nms-patches/PlayerConnectionUtils.patch

11 Zeilen
630 B
Diff

--- a/net/minecraft/server/PlayerConnectionUtils.java
+++ b/net/minecraft/server/PlayerConnectionUtils.java
@@ -5,6 +5,7 @@
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException {
if (!iasynctaskhandler.isMainThread()) {
iasynctaskhandler.postToMainThread(() -> {
+ if (t0 instanceof PlayerConnection && ((PlayerConnection) t0).processedDisconnect) return; // CraftBukkit
packet.a(t0);
});
throw CancelledPacketHandleException.INSTANCE;