mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 19:44:15 +02:00
Allow /unbanip playername, not just ips
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.earth2me.essentials.commands;
|
package com.earth2me.essentials.commands;
|
||||||
|
|
||||||
import static com.earth2me.essentials.I18n._;
|
import static com.earth2me.essentials.I18n._;
|
||||||
|
import com.earth2me.essentials.User;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
@@ -19,7 +20,10 @@ public class Commandunbanip extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
User user = getPlayer(server, args, 0, true);
|
||||||
|
if (user != null) {
|
||||||
|
ess.getServer().unbanIP(user.getLastLoginAddress());
|
||||||
|
}
|
||||||
ess.getServer().unbanIP(args[0]);
|
ess.getServer().unbanIP(args[0]);
|
||||||
sender.sendMessage(_("unbannedIP"));
|
sender.sendMessage(_("unbannedIP"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user