diff options
| author | Léo Kosman <leo.kosman@proton.me> | 2024-08-22 20:47:57 +0200 |
|---|---|---|
| committer | Léo Kosman <leo.kosman@proton.me> | 2024-08-22 20:47:57 +0200 |
| commit | dc17a97ff6a6bab748d7bd3062481bb5dac6d85f (patch) | |
| tree | 2eed52533c8a0b282dbe99b5b89d5c20807da578 /src/main/java/world/anhgelus | |
| parent | 809bcecbdccf29a3c6a710590d22758431033ed9 (diff) | |
feat: add error message when stopping unstarted game
Diffstat (limited to 'src/main/java/world/anhgelus')
| -rw-r--r-- | src/main/java/world/anhgelus/molehunt/Molehunt.java | 1 |
1 files changed, 1 insertions, 0 deletions
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(); |
