diff --git a/build-number.txt b/build-number.txt index 8fad7c29..c6778f88 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -1354 \ No newline at end of file +1355 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/command/CommandContext.java b/src/main/java/me/chayapak1/chomens_bot/command/CommandContext.java index 76398416..d14bab52 100644 --- a/src/main/java/me/chayapak1/chomens_bot/command/CommandContext.java +++ b/src/main/java/me/chayapak1/chomens_bot/command/CommandContext.java @@ -49,7 +49,7 @@ public class CommandContext { if (required) { throw new CommandException( Component.translatable( - "Expected %s at position %s (%s %s) [%s]", + "Expected %s at position %s (%s %s)%s", Component.text(type), Component.text(argsPosition), Component.text(prefix + userInputCommandName), @@ -59,9 +59,18 @@ public class CommandContext { .text(String.join(" ", args)) .append(Component.space()) .append(UNKNOWN_ARGUMENT_COMPONENT), - Component - .text("click for usages") - .clickEvent(ClickEvent.suggestCommand(prefix + "help " + this.commandName)) + inGame ? + Component + .space() + .append( + Component.translatable("[%s]") + .arguments( + Component + .text("click for usages") + .clickEvent(ClickEvent.suggestCommand(prefix + "help " + this.commandName)) + ) + ) : + Component.empty() ) ); } else {