diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-27 16:58:47 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-27 16:58:47 +0100 |
commit | c5251591de0cc085d45a197dbabcb3b9a99ae74d (patch) | |
tree | 2c33167ca3015d5d01e2e33ceff142c9655cbbd3 | |
parent | ccb4d3a7e8fabd4e4e6a607604bef953cb4e9086 (diff) | |
download | Essentials-c5251591de0cc085d45a197dbabcb3b9a99ae74d.tar Essentials-c5251591de0cc085d45a197dbabcb3b9a99ae74d.tar.gz Essentials-c5251591de0cc085d45a197dbabcb3b9a99ae74d.tar.lz Essentials-c5251591de0cc085d45a197dbabcb3b9a99ae74d.tar.xz Essentials-c5251591de0cc085d45a197dbabcb3b9a99ae74d.zip |
Allow /unbanip playername, not just ips
-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")); } |