How i can get Nearby Entities in determine location example Code:java for(Iterator<?> iterator = location.getNearbyEntities(4, 4, 4).iterator(); iterator.hasNext();){Entity nearby = (Entity)iterator.next();if(nearby instanceof Player){......... }}
Sorry, I don't understand what your asking... OHHH, I get it You have to spawn an entity in the location and check getNearbyEntities() on the new entity, then despawn the entity. Or you could write your own logic for calculating the entities distance from the location, depends on what you want really.
O thx for asking! like this? Code:java world.spawnEntity(loc, EntityType.PLAYER); Can me show example ? sorry my english