Add spaces between mute reason args. Add color code support to reason.

This commit is contained in:
Aust1n46 2021-04-25 22:17:08 -05:00
parent ffbfd4150a
commit e9a5ab2f8c
2 changed files with 5 additions and 4 deletions

View File

@ -51,9 +51,9 @@ public class Mute implements VentureCommand {
} }
StringBuilder reasonBuilder = new StringBuilder(); StringBuilder reasonBuilder = new StringBuilder();
for(int a = reasonStartPos; a < args.length; a ++) { for(int a = reasonStartPos; a < args.length; a ++) {
reasonBuilder.append(args[a]); reasonBuilder.append(args[a] + " ");
} }
reason = reasonBuilder.toString(); reason = Format.FormatStringAll(reasonBuilder.toString().trim());
} }
if(channel.getBungee()) { if(channel.getBungee()) {
sendBungeeCordMute(sender, args[1], channel, time, reason); sendBungeeCordMute(sender, args[1], channel, time, reason);

View File

@ -8,6 +8,7 @@ import mineverse.Aust1n46.chat.api.MineverseChatPlayer;
import mineverse.Aust1n46.chat.channel.ChatChannel; import mineverse.Aust1n46.chat.channel.ChatChannel;
import mineverse.Aust1n46.chat.command.VentureCommand; import mineverse.Aust1n46.chat.command.VentureCommand;
import mineverse.Aust1n46.chat.localization.LocalizedMessage; import mineverse.Aust1n46.chat.localization.LocalizedMessage;
import mineverse.Aust1n46.chat.utilities.Format;
public class Muteall implements VentureCommand { public class Muteall implements VentureCommand {
@ -30,9 +31,9 @@ public class Muteall implements VentureCommand {
if(args.length > 1) { if(args.length > 1) {
StringBuilder reasonBuilder = new StringBuilder(); StringBuilder reasonBuilder = new StringBuilder();
for(int a = 1; a < args.length; a ++) { for(int a = 1; a < args.length; a ++) {
reasonBuilder.append(args[a]); reasonBuilder.append(args[a] + " ");
} }
reason = reasonBuilder.toString(); reason = Format.FormatStringAll(reasonBuilder.toString().trim());
} }
if(reason.isEmpty()) { if(reason.isEmpty()) {
boolean bungee = false; boolean bungee = false;