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-06-13 00:00:12 +02:00
|
|
|
index 01ed2f2bc2b888f0c8e3c47f51114fac82f7a368..ed19c6c2eb72800af7b978df677ff317f05795ba 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-06-09 01:04:53 +02:00
|
|
|
@@ -2124,6 +2124,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
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);
|