Skip to content

Commit

Permalink
May as well set name to empty component
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 14, 2022
1 parent bc16fb9 commit ab458f4
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -1217,9 +1217,10 @@ public boolean sendTabListAdd(Player recipient, Player listPlayer) {
boolean list = entity instanceof NPCHolder
? !((NPCHolder) entity).getNPC().data().get("removefromtablist", Setting.DISABLE_TABLIST.asBoolean())
: false;

ClientboundPlayerInfoUpdatePacket.Entry entry = new ClientboundPlayerInfoUpdatePacket.Entry(entity.getUUID(),
entity.getGameProfile(), list, entity.latency, entity.gameMode.getGameModeForPlayer(),
entity.getTabListDisplayName(),
!list ? Component.empty() : entity.getTabListDisplayName(),
entity.getChatSession() == null ? null : entity.getChatSession().asData());

try {
Expand Down

0 comments on commit ab458f4

Please sign in to comment.