mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-12 03:52:52 +08:00
24 lines
752 B
Java
24 lines
752 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.GenshinPlayer;
|
|
|
|
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(GenshinPlayer sender, List<String> args) {
|
|
CommandHandler.sendMessage(null, "Server shutting down...");
|
|
for (GenshinPlayer p : Grasscutter.getGameServer().getPlayers().values()) {
|
|
CommandHandler.sendMessage(p, "Server shutting down...");
|
|
}
|
|
|
|
System.exit(1);
|
|
}
|
|
}
|