diff options
author | Nathan Wolf <nathan@elmakers.com> | 2015-04-06 06:27:48 -0700 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-04-07 19:06:41 +1000 |
commit | 8d91199e35c782e94c4dd41fdc8140f84e048ef1 (patch) | |
tree | 2121eafbb951e0d0a6d8def8178fe5bf44468853 | |
parent | fc9b07810a28a0bdaf5541bf1b7bb2107d90323d (diff) | |
download | bukkit-8d91199e35c782e94c4dd41fdc8140f84e048ef1.tar bukkit-8d91199e35c782e94c4dd41fdc8140f84e048ef1.tar.gz bukkit-8d91199e35c782e94c4dd41fdc8140f84e048ef1.tar.lz bukkit-8d91199e35c782e94c4dd41fdc8140f84e048ef1.tar.xz bukkit-8d91199e35c782e94c4dd41fdc8140f84e048ef1.zip |
Add a getNearbyEntities method to get entities which are within range of a specified location.
-rw-r--r-- | src/main/java/org/bukkit/World.java | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ -442,6 +442,19 @@ public interface World extends PluginMessageRecipient, Metadatable { public List<Player> 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<Entity> getNearbyEntities(Location location, double x, double y, double z); + + /** * Gets the unique name of this world * * @return Name of this world |