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);
|
return configManager.getConfig(ChatNotificationsConfig.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void startUp()
|
||||||
|
{
|
||||||
|
updateHighlights();
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameStateChanged(GameStateChanged event)
|
public void onGameStateChanged(GameStateChanged event)
|
||||||
{
|
{
|
||||||
@@ -90,6 +96,12 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
public void onConfigChanged(ConfigChanged event)
|
public void onConfigChanged(ConfigChanged event)
|
||||||
{
|
{
|
||||||
if (event.getGroup().equals("chatnotification"))
|
if (event.getGroup().equals("chatnotification"))
|
||||||
|
{
|
||||||
|
updateHighlights();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateHighlights()
|
||||||
{
|
{
|
||||||
highlightMatcher = null;
|
highlightMatcher = null;
|
||||||
|
|
||||||
@@ -102,7 +114,6 @@ public class ChatNotificationsPlugin extends Plugin
|
|||||||
highlightMatcher = Pattern.compile("\\b(" + joined + ")\\b", Pattern.CASE_INSENSITIVE);
|
highlightMatcher = Pattern.compile("\\b(" + joined + ")\\b", Pattern.CASE_INSENSITIVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void onSetMessage(SetMessage event)
|
public void onSetMessage(SetMessage event)
|
||||||
|
|||||||
Reference in New Issue
Block a user