IcCookies 24 Share Posted February 14, 2017 Hey guys, Just wanted to know how to check if another player(not yourself) is in an area? Thanks Link to comment Share on other sites More sharing options...
Xephy 237 Share Posted February 14, 2017 getPlayers().all(player -> player != null && AREANAME.contains(player)); Pretty sure this works. Link to comment Share on other sites More sharing options...
Im A Baller 348 Share Posted February 14, 2017 public boolean containsPlayer(Area area) { return getPlayers().all(p -> p != null && area.contains(p) && !p.equals(getLocalPlayer())).size() > 0; } Link to comment Share on other sites More sharing options...
IcCookies 24 Author Share Posted February 14, 2017 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.