mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-01 04:10:54 +02:00
Updating banip to support offline players.
This commit is contained in:
@@ -30,7 +30,11 @@ public class Commandbanip extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
else
|
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"));
|
sender.sendMessage(Util.i18n("banIpAddress"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user