chat notifications: fix highlightOwnName/notifyOwnName config options
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user