From 81f9656c2b048ecc61fb26267f6ff6454d12b692 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 6 Apr 2015 06:27:48 -0700 Subject: [PATCH] Add a getNearbyEntities method to get entities which are within range of a specified location. By: Nathan Wolf --- paper-api/src/main/java/org/bukkit/World.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index c763abe5b4..127ad9d3fa 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/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 *