if (p != null) {
ban.setSubject(p.getName());
Canary.bans().issueBan(ban);
Canary.hooks().callHook(new BanHook(p, p.getIP(), (caller instanceof Player) ? (Player)caller : null, reason, timestamp));
caller.notice(Translator.translateAndFormat("ban banned", p.getName()));
p.kick(reason);
}
else {
ban.setSubject(cmd[1]);
Canary.bans().issueBan(ban);
Canary.hooks().callHook(new BanHook(null, "xxx.xxx.xxx.xxx", (caller instanceof Player) ? (Player)caller : null, reason, timestamp));