From dc17a97ff6a6bab748d7bd3062481bb5dac6d85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Kosman?= Date: Thu, 22 Aug 2024 20:47:57 +0200 Subject: feat: add error message when stopping unstarted game --- src/main/java/world/anhgelus/molehunt/Molehunt.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java index ad1fedd..49e775d 100644 --- a/src/main/java/world/anhgelus/molehunt/Molehunt.java +++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java @@ -71,6 +71,7 @@ public class Molehunt implements ModInitializer { command.then(literal("stop").requires(source -> source.hasPermissionLevel(1)).executes(context -> { if (game == null || !game.hasStarted()) { context.getSource().sendError(Text.of("Game has not started yet")); + return Command.SINGLE_SUCCESS; } game.stop(); -- cgit v1.2.3