From 368d1a7c1250b4138f683e64ebb6aadfe7a4b1b3 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 1 May 2024 18:03:37 +0100 Subject: [PATCH] Do not send empty upsert player info packets There is no harm in this, but seemingly, some common mod blows up on this, and, well, why eat buffer? --- .../com/velocitypowered/proxy/tablist/VelocityTabList.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java index e18881b45a..d6b4143ce4 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/tablist/VelocityTabList.java @@ -166,7 +166,9 @@ public void addEntry(TabListEntry entry1) { return entry; }); - this.connection.write(new UpsertPlayerInfoPacket(actions, List.of(playerInfoEntry))); + if (!actions.isEmpty()) { + this.connection.write(new UpsertPlayerInfoPacket(actions, List.of(playerInfoEntry))); + } } @Override