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);
}
}
else if (lastCombatAction != null)
{
if (Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout)
else if (lastCombatAction != null && Duration.between(getLastCombatAction(), Instant.now()).getSeconds() > combatTimeout)
{
overlayManager.remove(overlay);
}
}
}
@Override
protected void shutDown() throws Exception