raids: Merge nested if statements

This commit is contained in:
sdburns1998
2019-07-07 18:11:21 +02:00
parent 4a0fffd345
commit e586eaabb9
2 changed files with 5 additions and 10 deletions

View File

@@ -325,12 +325,9 @@ public class RaidsOverlay extends Overlay
String bossName = room.getBoss().getName();
String bossNameLC = bossName.toLowerCase();
if (plugin.isShowRecommendedItems())
if (plugin.isShowRecommendedItems() && plugin.getRecommendedItemsList().get(bossNameLC) != null)
{
if (plugin.getRecommendedItemsList().get(bossNameLC) != null)
{
imageIds.addAll(plugin.getRecommendedItemsList().get(bossNameLC));
}
imageIds.addAll(plugin.getRecommendedItemsList().get(bossNameLC));
}
tableComponent.addRow(plugin.isShowRecommendedItems() ? "" : room.getType().getName(), ColorUtil.prependColorTag(bossName, color));

View File

@@ -1218,12 +1218,10 @@ public class RaidsPlugin extends Plugin
{
if (raid.getRotationString().toLowerCase().equals("vasa,tekton,vespula")
&& raid.getFullRotationString().toLowerCase().contains("crabs")
&& raid.getFullRotationString().toLowerCase().contains("tightrope"))
&& raid.getFullRotationString().toLowerCase().contains("tightrope")
&& goodCrabs != null)
{
if (goodCrabs != null)
{
return goodCrabs;
}
return goodCrabs;
}
return null;
}