chat notifications: fix highlightOwnName/notifyOwnName config options

This commit is contained in:
Adam
2018-06-13 13:11:14 -04:00
parent 01eeb31d20
commit 0d70ae4144

View File

@@ -144,7 +144,7 @@ public class ChatNotificationsPlugin extends Plugin
usernameReplacer = "<col" + ChatColorType.HIGHLIGHT.name() + "><u>" + username + "</u><col" + ChatColorType.NORMAL.name() + ">"; usernameReplacer = "<col" + ChatColorType.HIGHLIGHT.name() + "><u>" + username + "</u><col" + ChatColorType.NORMAL.name() + ">";
} }
if (usernameMatcher != null) if (config.highlightOwnName() && usernameMatcher != null)
{ {
Matcher matcher = usernameMatcher.matcher(messageNode.getValue()); Matcher matcher = usernameMatcher.matcher(messageNode.getValue());
if (matcher.find()) if (matcher.find())
@@ -152,7 +152,7 @@ public class ChatNotificationsPlugin extends Plugin
messageNode.setValue(matcher.replaceAll(usernameReplacer)); messageNode.setValue(matcher.replaceAll(usernameReplacer));
update = true; update = true;
if (config.highlightOwnName()) if (config.notifyOnOwnName())
{ {
sendNotification(event); sendNotification(event);
} }