whalewatchers: Merge nested if statements
This commit is contained in:
@@ -98,14 +98,11 @@ public class WhaleWatchersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onOverlayMenuClicked(OverlayMenuClicked event)
|
||||
{
|
||||
if (event.getOverlay().equals(overlay))
|
||||
{
|
||||
if (event.getEntry().getOption().equals("Reset"))
|
||||
if (event.getOverlay().equals(overlay) && event.getEntry().getOption().equals("Reset"))
|
||||
{
|
||||
resetDamageCounter();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void startUp() throws Exception
|
||||
@@ -207,16 +204,10 @@ public class WhaleWatchersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onVarbitChanged(VarbitChanged event)
|
||||
{
|
||||
if (this.showDamageCounter)
|
||||
{
|
||||
if (client.getVar(VarPlayer.ATTACKING_PLAYER) == -1)
|
||||
{
|
||||
if (inCombat)
|
||||
if (this.showDamageCounter && client.getVar(VarPlayer.ATTACKING_PLAYER) == -1 && inCombat)
|
||||
{
|
||||
tickCountdown = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.protectItemWarning)
|
||||
{
|
||||
@@ -254,9 +245,7 @@ public class WhaleWatchersPlugin extends Plugin
|
||||
@Subscribe
|
||||
public void onGameTick(GameTick event)
|
||||
{
|
||||
if (this.showDamageCounter)
|
||||
{
|
||||
if (tickCountdown > 0 && tickCountdown < 11)
|
||||
if (this.showDamageCounter && tickCountdown > 0 && tickCountdown < 11)
|
||||
{
|
||||
tickCountdown--;
|
||||
if (tickCountdown == 1)
|
||||
@@ -266,7 +255,6 @@ public class WhaleWatchersPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.smiteableWarning && (client.getVar(Varbits.IN_WILDERNESS) == 1 || isPvpWorld(client.getWorldType())))
|
||||
{
|
||||
if (client.getLocalPlayer().getSkullIcon() != null && client.getLocalPlayer().getSkullIcon().equals(SkullIcon.SKULL))
|
||||
|
||||
Reference in New Issue
Block a user