From 5089da07fc159799ee11c28b0b517e2f8cf84b25 Mon Sep 17 00:00:00 2001 From: Gabik21 Date: Thu, 2 Apr 2020 17:46:24 +0200 Subject: [PATCH] Don't send ping update twice VelocityTabListEntry#setLatency calls the update method, which constructs a new packet and sends it to the client. The backend packet we are processing also reaches the client, therefore we are sending the same packet twice. VelocityTabListEntry#setLatencyInternal is the correct method here. --- .../velocitypowered/proxy/tablist/VelocityTabListLegacy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java index b1e5c2610..9a5118496 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabListLegacy.java @@ -68,7 +68,7 @@ public class VelocityTabListLegacy extends VelocityTabList { if (nameMapping.containsKey(strippedName)) { // ADD_PLAYER also used for updating ping VelocityTabListEntry entry = entries.get(nameMapping.get(strippedName)); if (entry != null) { - entry.setLatency(item.getLatency()); + entry.setLatencyInternal(item.getLatency()); } } else { UUID uuid = UUID.randomUUID(); // Use a fake uuid to preserve function of custom entries