mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
eed041d629
By: md_5 <git@md-5.net>
22 lines
1.1 KiB
Diff
22 lines
1.1 KiB
Diff
--- a/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
|
+++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java
|
|
@@ -11,6 +11,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();
|
|
@@ -24,6 +29,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);
|