From 8d91199e35c782e94c4dd41fdc8140f84e048ef1 Mon Sep 17 00:00:00 2001 From: Nathan Wolf Date: Mon, 6 Apr 2015 06:27:48 -0700 Subject: Add a getNearbyEntities method to get entities which are within range of a specified location. --- src/main/java/org/bukkit/World.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index c763abe5..127ad9d3 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -441,6 +441,19 @@ public interface World extends PluginMessageRecipient, Metadatable { */ public List getPlayers(); + /** + * Returns a list of entities within a bounding box centered around a Location. + * + * Some implementations may impose artificial restrictions on the size of the search bounding box. + * + * @param location The center of the bounding box + * @param x 1/2 the size of the box along x axis + * @param y 1/2 the size of the box along y axis + * @param z 1/2 the size of the box along z axis + * @return the collection of entities near location. This will always be a non-null collection. + */ + public Collection getNearbyEntities(Location location, double x, double y, double z); + /** * Gets the unique name of this world * -- cgit v1.2.3