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