Skip to content

Commit

Permalink
Fix nameplates
Browse files Browse the repository at this point in the history
Co-authored-by: MrFrydae <[email protected]>
  • Loading branch information
triphora and MrFrydae committed Jun 25, 2024
1 parent 93ad743 commit 88efc93
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static PlayerListEntry findPlayerListEntry(PlayerEntity player) {
PlayerListEntry entry = null;
for (PlayerListEntry playerListEntry : playerList) {
List<Text> siblings = playerListEntry.getDisplayName().getSiblings();
if (siblings.size() > 1 && siblings.get(1).contains(player.getName())) {
if (siblings.getFirst().contains(player.getName())) {
entry = playerListEntry;
}
}
Expand All @@ -30,7 +30,6 @@ public static PlayerListEntry findPlayerListEntry(PlayerEntity player) {

public static MutableText parseDisplayName(PlayerListEntry entry) {
List<Text> siblings = Lists.newArrayList(Objects.requireNonNull(entry.getDisplayName()).getSiblings());
siblings.remove(0); // Remove Server Tag

MutableText text = Text.empty();
for (Text sibling : siblings) {
Expand Down

0 comments on commit 88efc93

Please sign in to comment.