mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 12:31:26 +02:00
port 7337b86
- pipe for linebreak
This commit is contained in:
@@ -45,7 +45,7 @@ public class Commandban extends EssentialsCommand
|
|||||||
if (args.length > 1)
|
if (args.length > 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
banReason = _("banFormat", FormatUtil.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n")), senderName);
|
banReason = _("banFormat", FormatUtil.replaceFormat(getFinalArg(args, 1).replace("\\n", "\n").replace("|", "\n")), senderName);
|
||||||
userData.getBan().setReason(banReason);
|
userData.getBan().setReason(banReason);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -25,7 +25,7 @@ public class Commandkick extends EssentialsCommand
|
|||||||
throw new Exception(_("kickExempt"));
|
throw new Exception(_("kickExempt"));
|
||||||
}
|
}
|
||||||
String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
|
String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
|
||||||
kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n"));
|
kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n").replace("|", "\n"));
|
||||||
user.getPlayer().kickPlayer(kickReason);
|
user.getPlayer().kickPlayer(kickReason);
|
||||||
final String senderName = sender instanceof IUser ? ((IUser)sender).getPlayer().getDisplayName() : Console.NAME;
|
final String senderName = sender instanceof IUser ? ((IUser)sender).getPlayer().getDisplayName() : Console.NAME;
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ public class Commandkickall extends EssentialsCommand
|
|||||||
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
protected void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
|
||||||
{
|
{
|
||||||
String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
|
String kickReason = args.length > 1 ? getFinalArg(args, 1) : _("kickDefault");
|
||||||
kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n"));
|
kickReason = FormatUtil.replaceFormat(kickReason.replace("\\n", "\n").replace("|", "\n"));
|
||||||
for (Player onlinePlayer : server.getOnlinePlayers())
|
for (Player onlinePlayer : server.getOnlinePlayers())
|
||||||
{
|
{
|
||||||
if (sender instanceof IUser && onlinePlayer.getName().equalsIgnoreCase(((Player)sender).getName()))
|
if (sender instanceof IUser && onlinePlayer.getName().equalsIgnoreCase(((Player)sender).getName()))
|
||||||
|
Reference in New Issue
Block a user