mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
allow console to use color codes when sending mail (#2435) @triagonal
This commit is contained in:
parent
289d34d96c
commit
31b98fb9f3
1 changed files with 3 additions and 3 deletions
|
@ -105,11 +105,11 @@ public class Commandmail extends EssentialsCommand {
|
||||||
if (u == null) {
|
if (u == null) {
|
||||||
throw new Exception(tl("playerNeverOnServer", args[1]));
|
throw new Exception(tl("playerNeverOnServer", args[1]));
|
||||||
}
|
}
|
||||||
u.addMail(tl("mailFormat", "Server", getFinalArg(args, 2)));
|
u.addMail(tl("mailFormat", "Server", FormatUtil.replaceFormat(getFinalArg(args, 2))));
|
||||||
sender.sendMessage(tl("mailSent"));
|
sender.sendMessage(tl("mailSent"));
|
||||||
return;
|
return;
|
||||||
} else if (args.length >= 2 && "sendall".equalsIgnoreCase(args[0])) {
|
} else if (args.length >= 2 && "sendall".equalsIgnoreCase(args[0])) {
|
||||||
ess.runTaskAsynchronously(new SendAll(tl("mailFormat", "Server", getFinalArg(args, 1))));
|
ess.runTaskAsynchronously(new SendAll(tl("mailFormat", "Server", FormatUtil.replaceFormat(getFinalArg(args, 1)))));
|
||||||
sender.sendMessage(tl("mailSent"));
|
sender.sendMessage(tl("mailSent"));
|
||||||
return;
|
return;
|
||||||
} else if (args.length >= 2) {
|
} else if (args.length >= 2) {
|
||||||
|
@ -118,7 +118,7 @@ public class Commandmail extends EssentialsCommand {
|
||||||
if (u == null) {
|
if (u == null) {
|
||||||
throw new Exception(tl("playerNeverOnServer", args[0]));
|
throw new Exception(tl("playerNeverOnServer", args[0]));
|
||||||
}
|
}
|
||||||
u.addMail(tl("mailFormat", "Server", getFinalArg(args, 1)));
|
u.addMail(tl("mailFormat", "Server", FormatUtil.replaceFormat(getFinalArg(args, 1))));
|
||||||
sender.sendMessage(tl("mailSent"));
|
sender.sendMessage(tl("mailSent"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue