diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java index 2c1d06f39..2b22ede2c 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java @@ -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")); } |