Show PRIMARY_OWNER label in /nllm and /nllg chat output

The group's primary owner is identified via Group#isOwner, not a distinct
PlayerType, so getPlayerType returns OWNER for them. The MainGroupGUI already
special-cases the primary owner, but the chat-output commands did not, listing
them indistinguishably from other owner-rank members.

Label the primary owner as PRIMARY_OWNER in ListMembers (/nllm) and ListGroups
(/nllg), matching the GUI's special handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
xFier
2026-06-16 17:30:45 +01:00
parent 1e456558ff
commit c733b219a0
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ public class ListGroups extends BaseCommandMiddle {
for (int x = first; x < first + 10 && x < groups.size(); x++) {
Group g = GroupManager.getGroup(groups.get(x));
sb.append(String.format("%s : (%s)\n",
g.getName(), g.getPlayerType(uuid).toString()));
g.getName(), g.isOwner(uuid) ? "PRIMARY_OWNER" : g.getPlayerType(uuid).toString()));
}
}
sender.sendMessage(sb.toString());

View File

@@ -81,7 +81,7 @@ public class ListMembers extends BaseCommandMiddle {
for (UUID uu : uuids) {
sb.append(NameLayerAPI.getCurrentName(uu));
sb.append(" (");
sb.append(group.getPlayerType(uu));
sb.append(group.isOwner(uu) ? "PRIMARY_OWNER" : group.getPlayerType(uu));
sb.append(")\n");
}