aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0827-Treat-sequence-violations-like-they-should-be.patch
diff options
context:
space:
mode:
authorRiley Park <[email protected]>2024-05-15 17:06:59 -0700
committerGitHub <[email protected]>2024-05-15 17:06:59 -0700
commitf17519338bc589c045e0b32bfc37e048b23544d5 (patch)
treee50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0827-Treat-sequence-violations-like-they-should-be.patch
parent3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff)
downloadPaper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz
Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip
Expose server build information (#10729)
* Expose server build information * squash patches * final tweaks --------- Co-authored-by: Jake Potrebic <[email protected]> Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0827-Treat-sequence-violations-like-they-should-be.patch')
-rw-r--r--patches/server/0827-Treat-sequence-violations-like-they-should-be.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0827-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0827-Treat-sequence-violations-like-they-should-be.patch
new file mode 100644
index 0000000000..b60e6de65d
--- /dev/null
+++ b/patches/server/0827-Treat-sequence-violations-like-they-should-be.patch
@@ -0,0 +1,18 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+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 fa4c6bd37bd7e3c66c867bab61b11b0bd217fd22..665ef268a0936a52b979c6cca680e237ae7aa74c 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -1960,6 +1960,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+
+ public void ackBlockChangesUpTo(int sequence) {
+ if (sequence < 0) {
++ this.disconnect("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);