From 6dfd0e6cd35ee0c47d1c7727e44de471bbf56bd2 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:20:32 -0500 Subject: [PATCH] Create 0042-Fix-keepalive-kicked-name.patch --- .../0042-Fix-keepalive-kicked-name.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/0042-Fix-keepalive-kicked-name.patch diff --git a/patches/server/0042-Fix-keepalive-kicked-name.patch b/patches/server/0042-Fix-keepalive-kicked-name.patch new file mode 100644 index 000000000..2aac7c1b6 --- /dev/null +++ b/patches/server/0042-Fix-keepalive-kicked-name.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> +Date: Sun, 3 Dec 2023 05:33:24 -0500 +Subject: [PATCH] Fix keepalive kicked name + + +diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +index 1cb6c157331f6ab7f63e88a6d5fc1237fecde35d..0cea82dda72d16e059e159b039b9fd58e08dd5ca 100644 +--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +@@ -228,7 +228,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + if (GaleGlobalConfiguration.get().misc.keepalive.sendMultiple) { + if (elapsedTime >= 1000L) { // 1 second + if (!this.processedDisconnect && this.keepAlives.size() >= KEEPALIVE_LIMIT_IN_SECONDS) { +- LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); ++ LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // Leaf - Fix name + disconnect(Component.translatable("disconnect.timeout"), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); + } else { + this.keepAliveTime = currentTime; // hijack this field for 1 second intervals