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,12 +158,9 @@ public class StatusBarsPlugin extends Plugin
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);
}
}