Support mail chat formatting via essentials.mail base permission. (#1611)

`essentials.mail.url`, `essentials.mail.color`, etc.
This commit is contained in:
Ali 'SupaHam' M 2017-10-29 01:16:04 +00:00 committed by GitHub
parent 57e87d9d4e
commit c14d565b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,8 @@ public class Commandmail extends EssentialsCommand {
throw new Exception(tl("playerNeverOnServer", args[1]));
}
final String mail = tl("mailFormat", user.getName(), StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2))));
String mail = tl("mailFormat", user.getName(), StringUtil.sanitizeString(FormatUtil.stripFormat(getFinalArg(args, 2))));
mail = FormatUtil.formatMessage(user, "essentials.mail", mail);
if (mail.length() > 1000) {
throw new Exception(tl("mailTooLong"));
}