diff --git a/src/main/java/emu/grasscutter/command/commands/StopCommand.java b/src/main/java/emu/grasscutter/command/commands/StopCommand.java index a5f9584bb..47f31b6af 100644 --- a/src/main/java/emu/grasscutter/command/commands/StopCommand.java +++ b/src/main/java/emu/grasscutter/command/commands/StopCommand.java @@ -17,8 +17,10 @@ public final class StopCommand implements CommandHandler { @Override public void execute(Player sender, Player targetPlayer, List args) { CommandHandler.sendMessage(null, translate("commands.stop.success")); - for (Player p : Grasscutter.getGameServer().getPlayers().values()) { - CommandHandler.sendMessage(p, translate(p, "commands.stop.success")); + if (Grasscutter.getGameServer() != null) { + for (Player p : Grasscutter.getGameServer().getPlayers().values()) { + CommandHandler.sendMessage(p, translate(p, "commands.stop.success")); + } } System.exit(1000);