Compare commits

...

2 Commits

Author SHA1 Message Date
Breno A.
3ef5b14c17
Merge 0e7e165dff into d340758614 2024-11-20 03:15:16 +08:00
jie65535
d340758614
Fix cannot stop in dispatch-only mode (#2534) 2024-11-18 23:05:24 -05:00

View File

@ -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);