barrows: Combine nested if statements

This commit is contained in:
sdburns1998
2019-07-07 02:25:26 +02:00
parent 6bd5fe0fe4
commit 6a35e214c2

View File

@@ -289,9 +289,7 @@ public class BarrowsPlugin extends Plugin
ladders.clear(); ladders.clear();
puzzleAnswer = null; puzzleAnswer = null;
} }
else if (event.getGameState() == GameState.LOGGED_IN) else if (event.getGameState() == GameState.LOGGED_IN && client.getLocalPlayer() != null)
{
if (client.getLocalPlayer() != null)
{ {
boolean isInCrypt = isInCrypt(); boolean isInCrypt = isInCrypt();
if (wasInCrypt && !isInCrypt) if (wasInCrypt && !isInCrypt)
@@ -304,7 +302,6 @@ public class BarrowsPlugin extends Plugin
} }
} }
} }
}
@Subscribe @Subscribe
public void onWidgetLoaded(WidgetLoaded event) public void onWidgetLoaded(WidgetLoaded event)