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)
{
boolean isInCrypt = isInCrypt();
if (wasInCrypt && !isInCrypt)
if (client.getLocalPlayer() != null)
{
stopPrayerDrainTimer();
}
else if (!wasInCrypt && isInCrypt)
{
startPrayerDrainTimer();
boolean isInCrypt = isInCrypt();
if (wasInCrypt && !isInCrypt)
{
stopPrayerDrainTimer();
}
else if (!wasInCrypt && isInCrypt)
{
startPrayerDrainTimer();
}
}
}
}