mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
Don't handle sync packets for kicked players
This commit is contained in:
parent
d5e96882ad
commit
2ced02339a
@ -73,7 +73,7 @@
|
||||
+ }
|
||||
+
|
||||
+ private final org.bukkit.craftbukkit.CraftServer server;
|
||||
+ private boolean processedDisconnect;
|
||||
+ public boolean processedDisconnect;
|
||||
+ private int lastTick = MinecraftServer.currentTick;
|
||||
+ private int allowedPlayerTicks = 1;
|
||||
+ private int lastDropTick = MinecraftServer.currentTick;
|
||||
|
10
nms-patches/PlayerConnectionUtils.patch
Normal file
10
nms-patches/PlayerConnectionUtils.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- 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;
|
Loading…
Reference in New Issue
Block a user