diff --git a/build-number.txt b/build-number.txt index d1c3966d..f594fd99 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -3165 \ No newline at end of file +3166 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/ClearChatCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/ClearChatCommand.java index 49cd3957..5336828f 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/ClearChatCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/ClearChatCommand.java @@ -33,27 +33,32 @@ public class ClearChatCommand extends Command { if (!name.isEmpty()) { final PlayerEntry entry = bot.players.getEntry(name); - if (entry == null) throw new CommandException(Component.translatable("commands.generic.error.invalid_player")); + if (entry == null) + throw new CommandException(Component.translatable("commands.generic.error.invalid_player")); final UUID uuid = entry.profile.getId(); bot.chat.tellraw( - Component.empty() - .append(Component.text("\n".repeat(1000))) - .append( - Component.translatable( - "commands.clearchat.specific", - NamedTextColor.DARK_GREEN, - context.displayName() + bot.commandHandler.renderTranslatable( + Component.empty() + .append(Component.text("\n".repeat(1000))) + .append( + Component.translatable( + "commands.clearchat.specific", + NamedTextColor.DARK_GREEN, + context.displayName() + ) ) - ), + ), uuid ); } else { bot.chat.tellraw( - Component.empty() - .append(Component.text("\n".repeat(1000))) - .append(Component.translatable("commands.clearchat.everyone").color(NamedTextColor.DARK_GREEN)) + bot.commandHandler.renderTranslatable( + Component.empty() + .append(Component.text("\n".repeat(1000))) + .append(Component.translatable("commands.clearchat.everyone", NamedTextColor.DARK_GREEN)) + ) ); }