Merge pull request #1698 from HSJ-OSRS/slayer-config

slayer: fix config updating
This commit is contained in:
Owain van Brakel
2019-10-01 15:29:34 +02:00
committed by GitHub

View File

@@ -820,20 +820,23 @@ public class SlayerPlugin extends Plugin
private void onConfigChanged(ConfigChanged event)
{
if (!event.getGroup().equals("slayer") || !event.getKey().equals("infobox"))
if (!event.getGroup().equals("slayer"))
{
return;
}
updateConfig();
if (this.showInfobox)
if (event.getKey().equals("infobox"))
{
clientThread.invoke(this::addCounter);
}
else
{
removeCounter();
if (this.showInfobox)
{
clientThread.invoke(this::addCounter);
}
else
{
removeCounter();
}
}
}