summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
index 2b22ede2c..c539a596c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandunbanip.java
@@ -20,10 +20,14 @@ public class Commandunbanip extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- User user = getPlayer(server, args, 0, true);
- if (user != null) {
+ try
+ {
+ final User user = getPlayer(server, args, 0, true);
ess.getServer().unbanIP(user.getLastLoginAddress());
}
+ catch (Exception ex)
+ {
+ }
ess.getServer().unbanIP(args[0]);
sender.sendMessage(_("unbannedIP"));
}