mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
19 lines
1.2 KiB
Diff
19 lines
1.2 KiB
Diff
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
|
|
index 37a918777ee7128fc85c4ab33c1a630daf9f91fe..0dd9cbd0d0277334bf6feaa50ab6aeb573f02bad 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -1956,6 +1956,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);
|