Skip to content

Commit

Permalink
list support non-ASCII
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyDynamic committed Oct 8, 2024
1 parent cd7a61a commit bc16006
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import io.github.skydynamic.quickbackupmulti.command.permission.PermissionManager;
import io.github.skydynamic.quickbackupmulti.command.permission.PermissionType;
import net.minecraft.command.argument.MessageArgumentType;
import net.minecraft.server.command.CommandManager;
import net.minecraft.server.command.ServerCommandSource;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static MutableText getSlotText(String name, int page, int num, long back
style.withClickEvent(
new ClickEvent(
ClickEvent.Action.SUGGEST_COMMAND,
"/qb back " + name)
"/qb back \"%s\"".formatted(name))
)
).styled(style ->
style.withHoverEvent(
Expand All @@ -118,7 +118,7 @@ private static MutableText getSlotText(String name, int page, int num, long back
style.withClickEvent(
new ClickEvent(
ClickEvent.Action.SUGGEST_COMMAND,
"/qb delete " + name)
"/qb delete \"%S\"".formatted(name))
)
).styled(style ->
style.withHoverEvent(
Expand All @@ -132,7 +132,7 @@ private static MutableText getSlotText(String name, int page, int num, long back
style.withClickEvent(
new ClickEvent(
ClickEvent.Action.SUGGEST_COMMAND,
"/qb show " + name)
"/qb show \"%s\"".formatted(name))
)
).styled(style ->
style.withHoverEvent(
Expand Down Expand Up @@ -228,7 +228,7 @@ public static MutableText show(String name) {
MutableText deleteText = Messenger.literal(tr("quickbackupmulti.show.delete_button"));
backText.styled(style ->
style.withClickEvent(
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/qb back " + name)
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/qb back \"%s\"".formatted(name))
)
).styled(style ->
style.withHoverEvent(
Expand All @@ -239,7 +239,7 @@ public static MutableText show(String name) {
);
deleteText.styled(style ->
style.withClickEvent(
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/qb delete " + name))
new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/qb delete \"%s\"".formatted(name)))
).styled(style ->
style.withHoverEvent(
new HoverEvent(
Expand Down

0 comments on commit bc16006

Please sign in to comment.