statusbars: Merge nested if statements

This commit is contained in:
sdburns1998
2019-07-07 21:13:47 +02:00
parent e9923cf963
commit ab203bf57d

View File

@@ -158,14 +158,11 @@ public class StatusBarsPlugin extends Plugin
overlayManager.add(overlay); overlayManager.add(overlay);
} }
} }
else if (lastCombatAction != null) else if (lastCombatAction != null && Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout)
{
if (Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout)
{ {
overlayManager.remove(overlay); overlayManager.remove(overlay);
} }
} }
}
@Override @Override
protected void shutDown() throws Exception protected void shutDown() throws Exception