NPE Fix for Barrows

This commit is contained in:
Ganom
2019-05-29 19:09:03 -04:00
parent 48623e71a4
commit 6a399061e9

View File

@@ -258,14 +258,17 @@ public class BarrowsPlugin extends Plugin
} }
else if (event.getGameState() == GameState.LOGGED_IN) else if (event.getGameState() == GameState.LOGGED_IN)
{ {
boolean isInCrypt = isInCrypt(); if (client.getLocalPlayer() != null)
if (wasInCrypt && !isInCrypt)
{ {
stopPrayerDrainTimer(); boolean isInCrypt = isInCrypt();
} if (wasInCrypt && !isInCrypt)
else if (!wasInCrypt && isInCrypt) {
{ stopPrayerDrainTimer();
startPrayerDrainTimer(); }
else if (!wasInCrypt && isInCrypt)
{
startPrayerDrainTimer();
}
} }
} }
} }