Fixed when Toggle Option is off on Login
- This caused an issue where the delay would be ignored after setting it on after login
This commit is contained in:
@@ -81,22 +81,23 @@ public class StatusBarsPlugin extends Plugin
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void onGameTick(GameTick gameTick)
|
public void onGameTick(GameTick gameTick)
|
||||||
{
|
{
|
||||||
final Actor interacting = client.getLocalPlayer().getInteracting();
|
|
||||||
final boolean isNpc = interacting instanceof NPC;
|
|
||||||
final int COMBAT_TIMEOUT = config.hideStatusBarDelay();
|
|
||||||
|
|
||||||
if (!config.toggleRestorationBars())
|
if (!config.toggleRestorationBars())
|
||||||
{
|
{
|
||||||
overlayManager.add(overlay);
|
overlayManager.add(overlay);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
final Actor interacting = client.getLocalPlayer().getInteracting();
|
||||||
|
final boolean isNpc = interacting instanceof NPC;
|
||||||
|
final int COMBAT_TIMEOUT = config.hideStatusBarDelay();
|
||||||
|
|
||||||
if (isNpc)
|
if (isNpc)
|
||||||
{
|
{
|
||||||
final NPC npc = (NPC) interacting;
|
final NPC npc = (NPC) interacting;
|
||||||
final NPCComposition npcComposition = npc.getComposition();
|
final NPCComposition npcComposition = npc.getComposition();
|
||||||
final List<String> npcMenuActions = Arrays.asList(npcComposition.getActions());
|
final List<String> npcMenuActions = Arrays.asList(npcComposition.getActions());
|
||||||
if (npcMenuActions.contains("Attack"))
|
if (npcMenuActions.contains("Attack") && config.toggleRestorationBars())
|
||||||
{
|
{
|
||||||
updateLastCombatAction();
|
updateLastCombatAction();
|
||||||
overlayManager.add(overlay);
|
overlayManager.add(overlay);
|
||||||
@@ -110,6 +111,7 @@ public class StatusBarsPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void shutDown() throws Exception
|
protected void shutDown() throws Exception
|
||||||
|
|||||||
Reference in New Issue
Block a user