mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-05-21 06:43:24 +00:00
Updating banip to support offline players.
This commit is contained in:
parent
eda827b244
commit
f51b92c99e
1 changed files with 5 additions and 1 deletions
|
@ -30,7 +30,11 @@ public class Commandbanip extends EssentialsCommand
|
|||
}
|
||||
else
|
||||
{
|
||||
ess.getServer().banIP(u.getAddress().getAddress().getHostAddress());
|
||||
final String ipAddress = u.getLastLoginAddress();
|
||||
if (ipAddress.length() == 0) {
|
||||
throw new Exception(Util.i18n("playerNotFound"));
|
||||
}
|
||||
ess.getServer().banIP(u.getLastLoginAddress());
|
||||
sender.sendMessage(Util.i18n("banIpAddress"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue