fix list for null display names

This commit is contained in:
Chayapak 2023-06-23 19:10:54 +07:00
parent 13b8831d0e
commit 6812edaa94

View file

@ -51,7 +51,9 @@ public class ListCommand implements Command {
playersComponent.add(
Component.translatable(
"%s %s",
entry.displayName()
entry.displayName() == null ?
Component.text(entry.profile().getName()).color(ColorUtilities.getColorByString(bot.config().colorPalette().username())) :
entry.displayName()
.hoverEvent(
HoverEvent.showText(
Component