mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-12 03:43:21 +08:00
24 lines
738 B
Java
24 lines
738 B
Java
package emu.grasscutter.command.commands;
|
|
|
|
import emu.grasscutter.Grasscutter;
|
|
import emu.grasscutter.command.Command;
|
|
import emu.grasscutter.command.CommandHandler;
|
|
import emu.grasscutter.game.player.Player;
|
|
|
|
import java.util.List;
|
|
|
|
@Command(label = "stop", usage = "stop",
|
|
description = "Stops the server", permission = "server.stop")
|
|
public final class StopCommand implements CommandHandler {
|
|
|
|
@Override
|
|
public void execute(Player sender, List<String> args) {
|
|
CommandHandler.sendMessage(null, "Server shutting down...");
|
|
for (Player p : Grasscutter.getGameServer().getPlayers().values()) {
|
|
CommandHandler.sendMessage(p, "Server shutting down...");
|
|
}
|
|
|
|
System.exit(1);
|
|
}
|
|
}
|