mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Make /doom ban all IPs
Before, /doom would only ban the current IP
This commit is contained in:
parent
9bc0859fdf
commit
8a4fa946fd
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Mon May 05 16:00:01 CEST 2014
|
||||
build.number=822
|
||||
#Mon May 05 16:09:04 CEST 2014
|
||||
build.number=823
|
||||
|
@ -35,7 +35,7 @@ public class Command_cage extends TFM_Command
|
||||
}
|
||||
else if ("purge".equals(args[0]))
|
||||
{
|
||||
TFM_Util.adminAction(sender.getName(), "Uncaging all players.", true);
|
||||
TFM_Util.adminAction(sender.getName(), "Uncaging all players", true);
|
||||
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
|
@ -13,10 +13,9 @@ public class Command_denick extends TFM_Command
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
TFM_Util.adminAction(sender.getName(), "Removing all nicknames.", false);
|
||||
TFM_Util.adminAction(sender.getName(), "Removing all nicknames", false);
|
||||
|
||||
Player[] onlinePlayers = server.getOnlinePlayers();
|
||||
for (Player player : onlinePlayers)
|
||||
for (Player player : server.getOnlinePlayers())
|
||||
{
|
||||
TFM_EssentialsBridge.getInstance().setNickname(player.getName(), null);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_AdminList;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Ban;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_BanManager;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_PlayerList;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import me.StevenLawson.TotalFreedomMod.TotalFreedomMod;
|
||||
import org.bukkit.ChatColor;
|
||||
@ -51,8 +52,11 @@ public class Command_doom extends TFM_Command
|
||||
// deop
|
||||
player.setOp(false);
|
||||
|
||||
// ban IP
|
||||
TFM_BanManager.getInstance().addIpBan(new TFM_Ban(ip, player.getName()));
|
||||
// ban IPs
|
||||
for (String playerIp : TFM_PlayerList.getInstance().getEntry(player).getIps())
|
||||
{
|
||||
TFM_BanManager.getInstance().addIpBan(new TFM_Ban(playerIp, player.getName()));
|
||||
}
|
||||
|
||||
// ban name
|
||||
TFM_BanManager.getInstance().addUuidBan(new TFM_Ban(player.getUniqueId(), player.getName()));
|
||||
|
Loading…
Reference in New Issue
Block a user