clanmanmode: Combine nested if statements
This commit is contained in:
@@ -37,12 +37,7 @@ public class ClanManModeService
|
||||
int selfmax = localPlayer.getCombatLevel() + plugin.wildernessLevel;
|
||||
for (Player player : client.getPlayers())
|
||||
{
|
||||
if (player == null || player.getName() == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (player.equals(localPlayer))
|
||||
if (player == null || player.getName() == null || player.equals(localPlayer))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -55,16 +50,10 @@ public class ClanManModeService
|
||||
interactor = ((Player) interacting);
|
||||
}
|
||||
|
||||
if (plugin.isShowAttackers())
|
||||
{
|
||||
if (interactor != null)
|
||||
{
|
||||
if (interactor.getName().equals(localName))
|
||||
if (plugin.isShowAttackers() && interactor != null && interactor.getName().equals(localName))
|
||||
{
|
||||
consumer.accept(player, plugin.getGetAttackerColor());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.inwildy == 1)
|
||||
{
|
||||
@@ -74,11 +63,7 @@ public class ClanManModeService
|
||||
{
|
||||
plugin.clan.put(player.getName(), player.getCombatLevel());
|
||||
}
|
||||
if (plugin.isHighlightAttacked())
|
||||
{
|
||||
if (interactor != null)
|
||||
{
|
||||
if (!interactors.containsKey(interactor.getName()))
|
||||
if (plugin.isHighlightAttacked() && interactor != null && !interactors.containsKey(interactor.getName()))
|
||||
{
|
||||
WorldPoint a = interactor.getWorldLocation();
|
||||
int underLevel = ((a.getY() - 9920) / 8) + 1;
|
||||
@@ -107,20 +92,13 @@ public class ClanManModeService
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plugin.isPersistentClan())
|
||||
{
|
||||
if (plugin.clan.containsKey(player.getName()))
|
||||
if (plugin.isPersistentClan() && plugin.clan.containsKey(player.getName()))
|
||||
{
|
||||
consumer.accept(player, plugin.getGetClanMemberColor());
|
||||
}
|
||||
}
|
||||
if (plugin.isHighlightAttacked())
|
||||
{
|
||||
if (interactors.containsKey(player.getName()))
|
||||
if (plugin.isHighlightAttacked() && interactors.containsKey(player.getName()))
|
||||
{
|
||||
String attackername = interactors.get(player.getName());
|
||||
boolean found = false;
|
||||
@@ -158,7 +136,6 @@ public class ClanManModeService
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (plugin.isHighlightAttackable())
|
||||
{
|
||||
if ((plugin.isHideAttackable() && plugin.ticks >= plugin.getHideTime()) || plugin.clan.containsKey(player.getName()))
|
||||
|
||||
Reference in New Issue
Block a user