Skip to content

Commit cfb0079

Browse files
committed
[Savestates] Fix components not being clickable in chat
1 parent 80e48b2 commit cfb0079

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/minecrafttas/tasmod/commands/CommandSavestate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ else if ("reload".equals(first)) {
183183
}
184184

185185
else if ("rename".equals(first)) {
186-
int index = processIndex(args[2]);
187-
String name = getRestArgsAsString(3, args);
186+
int index = processIndex(args[1]);
187+
String name = getRestArgsAsString(2, args);
188188

189189
rename(sender, index, name);
190190
return;

src/main/java/com/minecrafttas/tasmod/util/Component.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static Component wrap(Component saveComponent, TextFormatting color) {
9595
}
9696

9797
public static Component wrap(Component component) {
98-
return Component.literal(String.format("[%s]", component.build().getFormattedText()));
98+
return Component.translatable("[%s]", component);
9999
}
100100

101101
public static class CClickEvent {

0 commit comments

Comments
 (0)