From a4f7b0e6a8bd0858f34273649dac66a1a014594e Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 26 Oct 2024 17:10:36 +0700 Subject: [PATCH] forgor to change the thingy to use CommandException --- .../java/me/chayapak1/chomens_bot/commands/SeenCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/SeenCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/SeenCommand.java index 5ced1f9..509f16d 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/SeenCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/SeenCommand.java @@ -43,10 +43,10 @@ public class SeenCommand extends Command { } final JsonElement playerElement = PlayersPersistentDataPlugin.playersObject.get(player); - if (playerElement == null) return Component.translatable( + if (playerElement == null) throw new CommandException(Component.translatable( "%s was never seen", Component.text(player) - ).color(NamedTextColor.RED); + )); final JsonObject lastSeen = playerElement.getAsJsonObject().get("lastSeen").getAsJsonObject();