1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 03:24:31 +02:00

Allow /unbanip playername, not just ips

This commit is contained in:
snowleo
2011-11-27 16:58:47 +01:00
parent a3016b7204
commit 3e72bbb36b

View File

@@ -1,6 +1,7 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
@@ -19,7 +20,10 @@ public class Commandunbanip extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
User user = getPlayer(server, args, 0, true);
if (user != null) {
ess.getServer().unbanIP(user.getLastLoginAddress());
}
ess.getServer().unbanIP(args[0]);
sender.sendMessage(_("unbannedIP"));
}