mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-29 11:31:55 +01:00
Allow /unbanip playername, not just ips
This commit is contained in:
parent
ccb4d3a7e8
commit
c5251591de
@ -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"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user