boosts plugin: check if skills change before removing infoboxes

Fixes annoying verbose logging all the time
This commit is contained in:
Adam
2018-02-17 12:22:00 -05:00
parent 627f0da0b8
commit 353cf87eb4

View File

@@ -93,10 +93,14 @@ public class BoostsPlugin extends Plugin
@Subscribe
public void onConfigChanged(ConfigChanged event)
{
Skill[] old = shownSkills;
updateShownSkills(config.enableSkill());
infoBoxManager.removeIf(t -> t instanceof BoostIndicator
&& !Arrays.asList(shownSkills).contains(((BoostIndicator) t).getSkill()));
if (!Arrays.equals(old, shownSkills))
{
infoBoxManager.removeIf(t -> t instanceof BoostIndicator
&& !Arrays.asList(shownSkills).contains(((BoostIndicator) t).getSkill()));
}
}
private void updateShownSkills(boolean showSkillingSkills)