aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0855-Treat-sequence-violations-like-they-should-be.patch
diff options
context:
space:
mode:
authormaxcom1 <[email protected]>2024-03-23 22:26:17 +0100
committerGitHub <[email protected]>2024-03-23 17:26:17 -0400
commitb6001403e9703cadaa6e8c8558e732b91c3c6d6e (patch)
treea8c57bbc334a8ad48d4ad2b43db335667b142bee /patches/server/0855-Treat-sequence-violations-like-they-should-be.patch
parent9ec7dfcbc41c6e625de0050b6997160a75df9f44 (diff)
downloadPaper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.tar.gz
Paper-b6001403e9703cadaa6e8c8558e732b91c3c6d6e.zip
Add methods to change entity physics (#10334)
Diffstat (limited to 'patches/server/0855-Treat-sequence-violations-like-they-should-be.patch')
-rw-r--r--patches/server/0855-Treat-sequence-violations-like-they-should-be.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0855-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0855-Treat-sequence-violations-like-they-should-be.patch
new file mode 100644
index 0000000000..d67cd31a14
--- /dev/null
+++ b/patches/server/0855-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 a1196f79968c950fd9d92123bb4018f8d29c3a82..c9dab47fe3db73b31b40e071d37f1be63401c19d 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -1964,6 +1964,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);