1
0
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:
KHobbits 2011-11-15 23:01:15 +00:00
parent 617a3b6331
commit 487b341f83

View File

@ -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"));
}
}