Paper/patches/server/0922-Add-some-minimal-debug-information-to-chat-packet-er.patch
Jake Potrebic b58063a949
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8124)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
607ce370 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
f14cea82 SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
8e43b278 PR-767: Add support checking/survivability methods for BlockData
b3dee151 SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

CraftBukkit Changes:
9a8e08010 SPIGOT-7069: Material.BARREL has Directional data class, should also be Openable
26bd88ccd SPIGOT-7070: Material.SCULK_VEIN has Waterlogged data class, should also be MultipleFacing
7ba06e15b SPIGOT-7095: StructureGrowEvent doesn't fire for mangrove propagules growing to a tree
163e35c91 PR-1079: Add support checking/survivability methods for BlockData
4230f8f0e SPIGOT-7083: Add Boat.WoodenType, Boat.Status; deprecate TreeSpecies

Spigot Changes:
14a2382f Rebuild patches
2022-07-12 10:16:05 -07:00

29 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Wed, 6 Jul 2022 05:52:22 +0100
Subject: [PATCH] Add some minimal debug information to chat packet errors
TODO: potentially add some kick leeway
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6f2006c53a27531ab04a95e446e30d85eb422970..1290f1c33062b2ea821abca33433a53662b6d340 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2159,14 +2159,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
private boolean tryHandleChat(String s, Instant instant) {
if (!this.updateChatOrder(instant)) {
- ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), s);
+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'; {} > {}", this.player.getName().getString(), s, this.lastChatTimeStamp.get().getEpochSecond(), instant.getEpochSecond()); // Paper
this.server.scheduleOnMain(() -> { // Paper - push to main
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"));
}); // Paper - push to main
return false;
} else {
if (this.isChatExpired(instant)) {
- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), s);
+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), s, instant.getEpochSecond(), Instant.now().getEpochSecond()); // Paper
}
return this.resetLastActionTime();