Merge pull request #978 from deathbeam/fix-herbiboar-npe

Fix herbiboar plugin NPE on startup
This commit is contained in:
Adam
2018-03-15 12:20:33 -04:00
committed by GitHub

View File

@@ -327,7 +327,7 @@ public class Herbiboars extends Plugin
private boolean checkArea()
{
return Arrays.stream(client.getMapRegions())
return client.getMapRegions() != null && Arrays.stream(client.getMapRegions())
.filter(x -> Arrays.stream(HERBIBOAR_REGIONS).anyMatch(y -> y == x))
.toArray().length > 0;
}