forgor to change the thingy to use CommandException

This commit is contained in:
Chayapak 2024-10-26 17:10:36 +07:00
parent d0f0911f8c
commit a4f7b0e6a8

View file

@ -43,10 +43,10 @@ public class SeenCommand extends Command {
} }
final JsonElement playerElement = PlayersPersistentDataPlugin.playersObject.get(player); 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", "%s was never seen",
Component.text(player) Component.text(player)
).color(NamedTextColor.RED); ));
final JsonObject lastSeen = playerElement.getAsJsonObject().get("lastSeen").getAsJsonObject(); final JsonObject lastSeen = playerElement.getAsJsonObject().get("lastSeen").getAsJsonObject();