May as well set name to empty component

This commit is contained in:
fullwall 2022-12-14 23:29:12 +08:00
parent bc16fb9cc3
commit ab458f4de9

View File

@ -1217,9 +1217,10 @@ public class NMSImpl implements NMSBridge {
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 {