mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-22 21:43:41 +00:00
Command cleanup
This commit is contained in:
parent
e5c77c1aeb
commit
e54d73704e
36 changed files with 165 additions and 162 deletions
|
@ -21,21 +21,21 @@ public class Commandbanip extends EssentialsCommand
|
|||
throw new NotEnoughArgumentsException();
|
||||
}
|
||||
|
||||
final User u = ess.getUser(args[0]);
|
||||
final User player = ess.getUser(args[0]);
|
||||
|
||||
if (u == null)
|
||||
if (player == null)
|
||||
{
|
||||
ess.getServer().banIP(args[0]);
|
||||
sender.sendMessage(Util.i18n("banIpAddress"));
|
||||
}
|
||||
else
|
||||
{
|
||||
final String ipAddress = u.getLastLoginAddress();
|
||||
final String ipAddress = player.getLastLoginAddress();
|
||||
if (ipAddress.length() == 0)
|
||||
{
|
||||
throw new Exception(Util.i18n("playerNotFound"));
|
||||
}
|
||||
ess.getServer().banIP(u.getLastLoginAddress());
|
||||
ess.getServer().banIP(player.getLastLoginAddress());
|
||||
sender.sendMessage(Util.i18n("banIpAddress"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue