mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-02 14:37:46 +01:00
Only show ban reason in the in-game display, not full banFormat.
This commit is contained in:
parent
f8cf3be87f
commit
d74952927a
@ -58,17 +58,17 @@ public class Commandban extends EssentialsCommand
|
|||||||
String banReason;
|
String banReason;
|
||||||
if (args.length > 1)
|
if (args.length > 1)
|
||||||
{
|
{
|
||||||
banReason = _("banFormat", Util.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n").replace("|", "\n")), senderName);
|
banReason = Util.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n").replace("|", "\n"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
banReason = _("banFormat", _("defaultBanReason"), senderName);
|
banReason = _("defaultBanReason");
|
||||||
}
|
}
|
||||||
|
|
||||||
user.setBanReason(banReason);
|
user.setBanReason(_("banFormat", banReason, senderName));
|
||||||
user.setBanned(true);
|
user.setBanned(true);
|
||||||
user.setBanTimeout(0);
|
user.setBanTimeout(0);
|
||||||
user.kickPlayer(banReason);
|
user.kickPlayer(_("banFormat", banReason, senderName));
|
||||||
|
|
||||||
server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason));
|
server.getLogger().log(Level.INFO, _("playerBanned", senderName, user.getName(), banReason));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user