Skip to content

Commit

Permalink
Do not send empty upsert player info packets
Browse files Browse the repository at this point in the history
There is no harm in this, but seemingly, some common mod blows up on this, and,
well, why eat buffer?
  • Loading branch information
electronicboy committed May 1, 2024
1 parent 5cdcf86 commit 368d1a7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 368d1a7

Please sign in to comment.