raidsthieving: Merge nested if statements

This commit is contained in:
sdburns1998
2019-07-07 18:16:41 +02:00
parent db978d6c67
commit 78c724f933

View File

@@ -94,13 +94,10 @@ public class ChestOverlay extends Overlay
if (chest != null) if (chest != null)
{ {
if (!plugin.isBatsFound() && !chest.isEverOpened()) if (!plugin.isBatsFound() && !chest.isEverOpened() && shouldDrawChest(pos))
{ {
if (shouldDrawChest(pos)) Color drawColor = new Color(setAlphaComponent(plugin.getGetPotentialBatColor().getRGB(), getChestOpacity(pos)));
{ drawCircleOnTrap(graphics, chest, drawColor);
Color drawColor = new Color(setAlphaComponent(plugin.getGetPotentialBatColor().getRGB(), getChestOpacity(pos)));
drawCircleOnTrap(graphics, chest, drawColor);
}
} }
if (chest.isPoison()) if (chest.isPoison())
{ {