blob: 325edea646e8799217cf84bc5ddb586feeeb9f28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package net.ess3.commands;
import static net.ess3.I18n._;
import net.ess3.api.IUser;
import org.bukkit.command.CommandSender;
public class Commandunbanip extends EssentialsCommand
{
@Override
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 1)
{
throw new NotEnoughArgumentsException();
}
try
{
final IUser user = ess.getUserMap().matchUser(args[0], true);
ess.getServer().unbanIP(user.getData().getIpAddress());
}
catch (Exception ex)
{
}
ess.getServer().unbanIP(args[0]);
sender.sendMessage(_("unbannedIP"));
}
}
|