mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 08:29:44 +00:00
Allow /unbanip playername, not just ips
This commit is contained in:
parent
ccb4d3a7e8
commit
c5251591de
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue