2023-03-30 02:29:38 +00: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
2024-01-20 11:50:16 +00:00
index 8bcd8a7fa65e05ccef0a205319cad9e84b4341b5..166dbfb6a06ac69774ecfe2e8c0b0c6f22a44d19 100644
2023-03-30 02:29:38 +00:00
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
2024-01-20 11:50:16 +00:00
@@ -2038,6 +2038,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
2023-03-30 02:29:38 +00:00
public void ackBlockChangesUpTo(int sequence) {
if (sequence < 0) {
2024-01-15 11:38:39 +00:00
+ this.disconnect("Expected packet sequence nr >= 0", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - Treat sequence violations like they should be
2023-03-30 02:29:38 +00:00
throw new IllegalArgumentException("Expected packet sequence nr >= 0");
} else {
this.ackBlockChangesUpTo = Math.max(sequence, this.ackBlockChangesUpTo);