aoewarnings: Combine nested if statements

This commit is contained in:
sdburns1998
2019-07-07 02:05:44 +02:00
parent 5a0df39b4d
commit d2d8992d82

View File

@@ -157,14 +157,12 @@ public class AoeWarningOverlay extends Overlay
graphics.setColor(new Color(setAlphaComponent(plugin.getOverlayColor().getRGB(), outlineAlpha), true));
graphics.drawPolygon(tilePoly);
}
if (plugin.isTickTimers())
if (plugin.isTickTimers() && tickProgress >= 0)
{
if (tickProgress >= 0)
{
OverlayUtil.renderTextLocation(graphics, Integer.toString(tickProgress), plugin.getTextSize(),
plugin.getFontStyle(), color, centerPoint(tilePoly.getBounds()), plugin.isShadows(), 0);
}
OverlayUtil.renderTextLocation(graphics, Integer.toString(tickProgress), plugin.getTextSize(),
plugin.getFontStyle(), color, centerPoint(tilePoly.getBounds()), plugin.isShadows(), 0);
}
graphics.setColor(new Color(setAlphaComponent(plugin.getOverlayColor().getRGB(), fillAlpha), true));
graphics.fillPolygon(tilePoly);
}