mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2024-11-23 04:19:43 +00:00
Fix cannot stop in dispatch-only mode (#2534)
Some checks failed
Build / Build-Server-Jar (push) Has been cancelled
Build Docker Container / publish (push) Has been cancelled
Lint & Format Code / Format-Code (push) Has been cancelled
Lint & Format Code / Update-Languages (push) Has been cancelled
Language Lint / Lint-Language-Keys (push) Has been cancelled
Some checks failed
Build / Build-Server-Jar (push) Has been cancelled
Build Docker Container / publish (push) Has been cancelled
Lint & Format Code / Format-Code (push) Has been cancelled
Lint & Format Code / Update-Languages (push) Has been cancelled
Language Lint / Lint-Language-Keys (push) Has been cancelled
This commit is contained in:
parent
76fd5b2e9c
commit
d340758614
@ -17,9 +17,11 @@ public final class StopCommand implements CommandHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
public void execute(Player sender, Player targetPlayer, List<String> args) {
|
||||||
CommandHandler.sendMessage(null, translate("commands.stop.success"));
|
CommandHandler.sendMessage(null, translate("commands.stop.success"));
|
||||||
|
if (Grasscutter.getGameServer() != null) {
|
||||||
for (Player p : Grasscutter.getGameServer().getPlayers().values()) {
|
for (Player p : Grasscutter.getGameServer().getPlayers().values()) {
|
||||||
CommandHandler.sendMessage(p, translate(p, "commands.stop.success"));
|
CommandHandler.sendMessage(p, translate(p, "commands.stop.success"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
System.exit(1000);
|
System.exit(1000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user