Fix Status Bars plugin "hide when our of combat"

When this option is enabled, status bars were only hidden after entering and leaving combat for the first time. This change allows the status bars to be correctly hidden without requiring entering then leaving combat.
This commit is contained in:
Grehgous
2020-01-10 21:52:04 -05:00
committed by GitHub
parent 11bb4086dd
commit ef80e0de28

View File

@@ -157,7 +157,8 @@ public class StatusBarsPlugin extends Plugin
overlayManager.add(overlay);
}
}
else if (lastCombatAction != null && Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout)
else if (lastCombatAction == null
|| (lastCombatAction != null && Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout))
{
overlayManager.remove(overlay);
}