diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/world/anhgelus/molehunt/Molehunt.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/world/anhgelus/molehunt/Molehunt.java b/src/main/java/world/anhgelus/molehunt/Molehunt.java index 7140512..cbb415d 100644 --- a/src/main/java/world/anhgelus/molehunt/Molehunt.java +++ b/src/main/java/world/anhgelus/molehunt/Molehunt.java @@ -69,9 +69,12 @@ public class Molehunt implements ModInitializer { return Command.SINGLE_SUCCESS; })); command.then(literal("stop").requires(source -> source.hasPermissionLevel(1)).executes(context -> { - if (game != null) { - game.stop(); + if (game == null || !game.isStarted()) { + context.getSource().sendError(Text.of("Game has not started yet")); } + + game.stop(); + return Command.SINGLE_SUCCESS; })); |
