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?
This commit is contained in:
Shane Freeder 2024-05-01 18:03:37 +01:00
parent 5cdcf86cf9
commit 368d1a7c12
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C

View File

@ -166,7 +166,9 @@ public class VelocityTabList implements InternalTabList {
return entry;
});
this.connection.write(new UpsertPlayerInfoPacket(actions, List.of(playerInfoEntry)));
if (!actions.isEmpty()) {
this.connection.write(new UpsertPlayerInfoPacket(actions, List.of(playerInfoEntry)));
}
}
@Override