13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/PlayerConnectionUtils.patch
CraftBukkit/Spigot cda432d64a Don't handle sync packets for kicked players
By: md_5 <git@md-5.net>
2019-02-03 14:23:04 +11:00

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;