37 lines
749 B
Java
37 lines
749 B
Java
package cn.citycraft.CTZServer.commands;
|
|
|
|
import cn.citycraft.CTZServer.ServerThread;
|
|
import cn.citycraft.CTZServerCommon.CTZServer;
|
|
import net.md_5.bungee.api.ChatColor;
|
|
|
|
public class CommandStop extends BaseCommand {
|
|
ServerThread serverThread;
|
|
|
|
public CommandStop(ServerThread serverThread) {
|
|
super("stop");
|
|
this.serverThread = serverThread;
|
|
}
|
|
|
|
@Override
|
|
public void execute(String label, String[] args) {
|
|
CTZServer.print(ChatColor.RED + "开始关闭服务器...");
|
|
serverThread.getServer().ShutDown();
|
|
}
|
|
|
|
@Override
|
|
public String getDescription() {
|
|
return ChatColor.RED + "关闭服务器";
|
|
}
|
|
|
|
@Override
|
|
public int getMinimumArguments() {
|
|
return 0;
|
|
}
|
|
|
|
@Override
|
|
public String getPossibleArguments() {
|
|
return "";
|
|
}
|
|
|
|
}
|