aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLéo Kosman <leo.kosman@proton.me>2024-08-22 20:47:57 +0200
committerLéo Kosman <leo.kosman@proton.me>2024-08-22 20:47:57 +0200
commitdc17a97ff6a6bab748d7bd3062481bb5dac6d85f (patch)
tree2eed52533c8a0b282dbe99b5b89d5c20807da578 /src/main/java
parent809bcecbdccf29a3c6a710590d22758431033ed9 (diff)
feat: add error message when stopping unstarted game
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/world/anhgelus/molehunt/Molehunt.java1
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();