本文整理了Java中org.bukkit.Server.shutdown()
方法的一些代码示例,展示了Server.shutdown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.shutdown()
方法的具体详情如下:
包路径:org.bukkit.Server
类名称:Server
方法名:shutdown
[英]Shutdowns the server, stopping everything.
[中]关闭服务器,停止一切。
代码示例来源:origin: Bukkit/Bukkit
/**
* @see Server#shutdown()
*/
public static void shutdown() {
server.shutdown();
}
代码示例来源:origin: GlowstoneMC/Glowstone
@Override
public boolean execute(CommandSender sender, String label, String[] args,
CommandMessages commandMessages) {
if (!testPermission(sender, commandMessages.getPermissionMessage())) {
return true;
}
Server server = ServerProvider.getServer();
if (args.length > 0 && server instanceof GlowServer) {
((GlowServer) server).shutdown(String.join(" ", args));
} else {
server.shutdown();
}
return true;
}
}
代码示例来源:origin: SpigotMC/Spigot-API
/**
* @see Server#shutdown()
*/
public static void shutdown() {
server.shutdown();
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void shutdown() {
s.shutdown();
}
代码示例来源:origin: TotalFreedom/TotalFreedomMod
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
FUtil.bcastMsg("Server is going offline!", ChatColor.LIGHT_PURPLE);
for (Player player : server.getOnlinePlayers())
{
player.kickPlayer("Server is going offline, come back in about 20 seconds.");
}
server.shutdown();
return true;
}
}
代码示例来源:origin: TotalFreedom/TotalFreedomMod
@Override
public boolean run(final CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{
plugin.sf.setSavedFlag("do_wipe_flatlands", true);
FUtil.bcastMsg("Server is going offline for flatlands wipe.", ChatColor.GRAY);
for (Player player : server.getOnlinePlayers())
{
player.kickPlayer("Server is going offline for flatlands wipe, come back in a few minutes.");
}
server.shutdown();
return true;
}
}
代码示例来源:origin: TotalFreedom/TotalFreedomMod
server.shutdown();
内容来源于网络,如有侵权,请联系作者删除!