From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder 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 index 2cd5ddcd99e77b6e28469a84d6b171b0c099819e..0545414171c65531a39d6c4f4f3ea669bd8214ee 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2058,6 +2058,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void ackBlockChangesUpTo(int sequence) { if (sequence < 0) { + this.disconnect(Component.literal("Expected packet sequence nr >= 0"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - Treat sequence violations like they should be throw new IllegalArgumentException("Expected packet sequence nr >= 0"); } else { this.ackBlockChangesUpTo = Math.max(sequence, this.ackBlockChangesUpTo);