mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-03 22:11:42 +01:00
allow console to use color codes when sending mail (#2435) @triagonal
This commit is contained in:
parent
289d34d96c
commit
31b98fb9f3
@ -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 New Issue
Block a user