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.
This commit is contained in:
Gabik21 2020-04-02 17:46:24 +02:00
parent c54ea62012
commit 5089da07fc
No known key found for this signature in database
GPG Key ID: A95DB353715365DF

View File

@ -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