2023-03-30 04:29:38 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
Date: Thu, 30 Mar 2023 03:13:58 +0100
|
|
|
|
Subject: [PATCH] Treat sequence violations like they should be
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2023-12-09 00:14:42 +01:00
|
|
|
index 7e6f530eb007e82c3115cb654165fa2c60a185ed..869440f9413610bed007bbfc0983113b2555d5f6 100644
|
2023-03-30 04:29:38 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2023-12-06 17:21:56 +01:00
|
|
|
@@ -2039,6 +2039,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
2023-03-30 04:29:38 +02:00
|
|
|
|
|
|
|
public void ackBlockChangesUpTo(int sequence) {
|
|
|
|
if (sequence < 0) {
|
|
|
|
+ this.disconnect("Expected packet sequence nr >= 0", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper
|
|
|
|
throw new IllegalArgumentException("Expected packet sequence nr >= 0");
|
|
|
|
} else {
|
|
|
|
this.ackBlockChangesUpTo = Math.max(sequence, this.ackBlockChangesUpTo);
|