本文整理了Java中org.bukkit.Server.unbanIP()
方法的一些代码示例,展示了Server.unbanIP()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.unbanIP()
方法的具体详情如下:
包路径:org.bukkit.Server
类名称:Server
方法名:unbanIP
[英]Unbans the specified address from the server.
[中]从服务器取消绑定指定的地址。
代码示例来源:origin: Bukkit/Bukkit
/**
* @see Server#unbanIP(String address)
*/
public static void unbanIP(String address) {
server.unbanIP(address);
}
代码示例来源:origin: GlowstoneMC/Glowstone
@Override
public boolean execute(CommandSender sender, String label, String[] args,
CommandMessages commandMessages) {
if (!testPermission(sender, commandMessages.getPermissionMessage())) {
return true;
}
if (args.length != 1) {
sendUsageMessage(sender, commandMessages);
return false;
}
String ip = args[0];
if (!InetAddresses.isInetAddress(ip)) {
new LocalizedStringImpl("pardon-ip.invalid", commandMessages.getResourceBundle())
.sendInColor(ChatColor.RED, sender, ip);
return false;
}
ServerProvider.getServer().unbanIP(ip);
new LocalizedStringImpl("pardon-ip.done", commandMessages.getResourceBundle())
.send(sender, ip);
return true;
}
}
代码示例来源:origin: SpigotMC/Spigot-API
/**
* @see Server#unbanIP(String address)
*/
public static void unbanIP(String address) {
server.unbanIP(address);
}
代码示例来源:origin: EngineHub/CommandHelper
@Override
public void unbanIP(String address) {
s.unbanIP(address);
}
内容来源于网络,如有侵权,请联系作者删除!