mirror of
https://github.com/essentials/Essentials.git
synced 2025-01-18 05:48:33 +01:00
Updating banip to support offline players.
This commit is contained in:
parent
617a3b6331
commit
487b341f83
@ -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…
x
Reference in New Issue
Block a user