mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
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:
@@ -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());
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user