Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
19 Zeilen
1.1 KiB
Diff
19 Zeilen
1.1 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 5cb45e6e5f73996b2a603589b8571cf0155a42c5..419979939efcf83f03edab522b4360c9d2c03fe3 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -2129,6 +2129,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
|
|
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);
|