mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-23 00:49:31 +00:00
* Update Leaf API patches to 1.20.5 * Updated Upstream (Purpur API) * Some server patches work * Update 1.20.6 * Some server patches work * Some some server patches work * 0oO0oO0oOo * iI1IiI1i|!il| * Updated Upstream (Gale/Purpur) * Server patches work * Updated Upstream (Gale)
20 lines
1.5 KiB
Diff
20 lines
1.5 KiB
Diff
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 5972362c1c968dbabb799824227c6ae3aef0b61e..f74f1411384945498823fbdcf9d2e0ce4fc3e8ae 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
|
@@ -282,7 +282,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 keepalive kicked name
|
|
disconnect(Component.translatable("disconnect.timeout"), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT);
|
|
} else {
|
|
this.keepAliveTime = currentTime; // hijack this field for 1 second intervals
|