if (target != null) {
String reason = Translator.translateAndFormat("kick message", caller.getName());
if (parameters.length > 2) {
reason = StringUtils.joinString(parameters, " ", 2);
}
new KickHook(target, caller, reason).call(); // Call KickHook here to pass the caller that is actually doing the kicking
target.kickNoHook(reason); // Don't call the hook again
caller.notice(Translator.translateAndFormat("kick kicked", target.getName()));
}
else {
caller.notice(Translator.translate("kick failed") + " " + Translator.translateAndFormat("unknown player", parameters[1]));