Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Don't handle sync packets for kicked players
Dieser Commit ist enthalten in:
Ursprung
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
Normale Datei
10
nms-patches/PlayerConnectionUtils.patch
Normale Datei
@ -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;
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren