api: Add contains methods to WorldPoint and WorldArea

This commit is contained in:
pwatts6060
2021-09-24 01:18:31 +02:00
committed by Owain van Brakel
parent 3a64e1063e
commit c08c6d80e8
3 changed files with 57 additions and 1 deletions
@@ -248,7 +248,7 @@ public class NpcAggroAreaPlugin extends Plugin
private static boolean isInWilderness(WorldPoint location)
{
return WILDERNESS_ABOVE_GROUND.distanceTo2D(location) == 0 || WILDERNESS_UNDERGROUND.distanceTo2D(location) == 0;
return location.isInArea2D(WILDERNESS_ABOVE_GROUND, WILDERNESS_UNDERGROUND);
}
private boolean isNpcMatch(NPC npc)