warindicators: Merge nested if statements
This commit is contained in:
@@ -68,12 +68,9 @@ public class WarIndicatorMiniMapOverlay extends Overlay
|
|||||||
String[] callers = plugin.getGetActiveCallers().split(", ");
|
String[] callers = plugin.getGetActiveCallers().split(", ");
|
||||||
String[] targets = plugin.getGetTargetedSnipes().split(", ");
|
String[] targets = plugin.getGetTargetedSnipes().split(", ");
|
||||||
|
|
||||||
if (plugin.isCallerMinimap() && ArrayUtils.contains(callers, actor.getName()))
|
if (plugin.isCallerMinimap() && ArrayUtils.contains(callers, actor.getName()) && minimapLocation != null)
|
||||||
{
|
{
|
||||||
if (minimapLocation != null)
|
OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color);
|
||||||
{
|
|
||||||
OverlayUtil.renderTextLocation(graphics, minimapLocation, name, color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isSnipeMinimap() && ArrayUtils.contains(targets, actor.getName()))
|
if (plugin.isSnipeMinimap() && ArrayUtils.contains(targets, actor.getName()))
|
||||||
|
|||||||
@@ -73,20 +73,14 @@ public class WarIndicatorOverlay extends Overlay
|
|||||||
String[] callers = plugin.getGetActiveCallers().split(", ");
|
String[] callers = plugin.getGetActiveCallers().split(", ");
|
||||||
String[] targets = plugin.getGetTargetedSnipes().split(", ");
|
String[] targets = plugin.getGetTargetedSnipes().split(", ");
|
||||||
|
|
||||||
if (plugin.isCallerTile() && ArrayUtils.contains(callers, actor.getName()))
|
if (plugin.isCallerTile() && ArrayUtils.contains(callers, actor.getName()) && poly != null)
|
||||||
{
|
{
|
||||||
if (poly != null)
|
OverlayUtil.renderPolygon(graphics, poly, color);
|
||||||
{
|
|
||||||
OverlayUtil.renderPolygon(graphics, poly, color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (plugin.isSnipeTile() && ArrayUtils.contains(targets, actor.getName()))
|
if (plugin.isSnipeTile() && ArrayUtils.contains(targets, actor.getName()) && poly != null)
|
||||||
{
|
{
|
||||||
if (poly != null)
|
OverlayUtil.renderPolygon(graphics, poly, color);
|
||||||
{
|
|
||||||
OverlayUtil.renderPolygon(graphics, poly, color);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = actor.getName().replace('\u00A0', ' ');
|
String name = actor.getName().replace('\u00A0', ' ');
|
||||||
|
|||||||
Reference in New Issue
Block a user