boosts plugin: check if skills change before removing infoboxes
Fixes annoying verbose logging all the time
This commit is contained in:
@@ -93,10 +93,14 @@ public class BoostsPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onConfigChanged(ConfigChanged event)
|
public void onConfigChanged(ConfigChanged event)
|
||||||
{
|
{
|
||||||
|
Skill[] old = shownSkills;
|
||||||
updateShownSkills(config.enableSkill());
|
updateShownSkills(config.enableSkill());
|
||||||
|
|
||||||
infoBoxManager.removeIf(t -> t instanceof BoostIndicator
|
if (!Arrays.equals(old, shownSkills))
|
||||||
&& !Arrays.asList(shownSkills).contains(((BoostIndicator) t).getSkill()));
|
{
|
||||||
|
infoBoxManager.removeIf(t -> t instanceof BoostIndicator
|
||||||
|
&& !Arrays.asList(shownSkills).contains(((BoostIndicator) t).getSkill()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateShownSkills(boolean showSkillingSkills)
|
private void updateShownSkills(boolean showSkillingSkills)
|
||||||
|
|||||||
Reference in New Issue
Block a user