Skip to content

Commit

Permalink
Fix cannot stop in dispatch-only mode (#2534)
Browse files Browse the repository at this point in the history
  • Loading branch information
jie65535 authored Nov 19, 2024
1 parent 76fd5b2 commit d340758
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ public final class StopCommand implements CommandHandler {
@Override
public void execute(Player sender, Player targetPlayer, List<String> 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);
Expand Down

0 comments on commit d340758

Please sign in to comment.