Fix NPE in Miscellania plugin on DC
When you DC, isInKingdom throws NPE in isInKingdom method because localPlayer is null. Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
@@ -123,7 +123,8 @@ public class KingdomPlugin extends Plugin
|
|||||||
|
|
||||||
private boolean isInKingdom()
|
private boolean isInKingdom()
|
||||||
{
|
{
|
||||||
return KINGDOM_REGION.contains(client.getLocalPlayer().getWorldLocation().getRegionID());
|
return client.getLocalPlayer() != null
|
||||||
|
&& KINGDOM_REGION.contains(client.getLocalPlayer().getWorldLocation().getRegionID());
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasCompletedQuest()
|
private boolean hasCompletedQuest()
|
||||||
|
|||||||
Reference in New Issue
Block a user