Fixed color permissions being ignored
This commit is contained in:
parent
83f735c74d
commit
1fecee13ed
@ -61,15 +61,15 @@ public class ChatAPI {
|
||||
*/
|
||||
public static String colorify(CommandSender sender, String message) {
|
||||
if (sender == null || sender.hasPermission(PERMISSION_CHAT_COLOR)) {
|
||||
message = message.replaceAll("&([0-9a-fA-FrR])", "§$1");
|
||||
message = message.replaceAll("&([0-9a-fA-FrR])", "§$1");
|
||||
}
|
||||
if (sender == null || sender.hasPermission(PERMISSION_CHAT_FORMAT)) {
|
||||
message = message.replaceAll("&([l-oL-OrR])", "§$1");
|
||||
message = message.replaceAll("&([l-oL-OrR])", "§$1");
|
||||
}
|
||||
if (sender == null || sender.hasPermission(PERMISSION_CHAT_MAGIC)) {
|
||||
message = message.replaceAll("&([kKrR])", "§$1");
|
||||
message = message.replaceAll("&([kKrR])", "§$1");
|
||||
}
|
||||
return message.replaceAll("&§", "&");
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user