chat notifications: load highlights on start
This commit is contained in:
@@ -74,6 +74,12 @@ public class ChatNotificationsPlugin extends Plugin
|
||||
return configManager.getConfig(ChatNotificationsConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startUp()
|
||||
{
|
||||
updateHighlights();
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onGameStateChanged(GameStateChanged event)
|
||||
{
|
||||
@@ -90,6 +96,12 @@ public class ChatNotificationsPlugin extends Plugin
|
||||
public void onConfigChanged(ConfigChanged event)
|
||||
{
|
||||
if (event.getGroup().equals("chatnotification"))
|
||||
{
|
||||
updateHighlights();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateHighlights()
|
||||
{
|
||||
highlightMatcher = null;
|
||||
|
||||
@@ -102,7 +114,6 @@ public class ChatNotificationsPlugin extends Plugin
|
||||
highlightMatcher = Pattern.compile("\\b(" + joined + ")\\b", Pattern.CASE_INSENSITIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onSetMessage(SetMessage event)
|
||||
|
||||
Reference in New Issue
Block a user