Skip to content

Commit fed5ad1

Browse files
committed
feat: /ftbranks list_all_ranks output now clickable
Clicking a rank name runs '/ftbranks show_rank <rank>' Also added hover text showing the rank condition, if any
1 parent 17eecee commit fed5ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/java/dev/ftb/mods/ftbranks/FTBRanksCommands.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private static Component makeRankNameClicky(Rank rank) {
187187
.withStyle(Style.EMPTY
188188
.withClickEvent(new ClickEvent(Action.RUN_COMMAND, "/ftbranks show_rank " + rank.getId()))
189189
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, isDef ?
190-
Component.literal("Players must be explicitly added to this rank\nwith '/ftbranks add <player> <rank>'").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC) :
190+
Component.literal("Players must be explicitly added to this rank\nwith '/ftbranks add <player> " + rank.getId() + "'").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC) :
191191
Component.literal("Rank condition: " + rank.getCondition().asString()).withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC))
192192
)
193193
);

0 commit comments

Comments
 (0)