From d922f76c36f515252957a56f28899cc4948a886d Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 26 Jan 2011 12:03:21 -0800 Subject: [PATCH] Added methods to get a list of entities to World. By: sk89q --- paper-api/src/main/java/org/bukkit/World.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 7c35bcc64a..046e884d82 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/src/main/java/org/bukkit/World.java @@ -1,10 +1,13 @@ package org.bukkit; +import java.util.List; import org.bukkit.block.Block; import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; +import org.bukkit.entity.Entity; import org.bukkit.entity.ItemDrop; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.PoweredMinecart; import org.bukkit.entity.Minecart; import org.bukkit.entity.StorageMinecart; @@ -155,6 +158,20 @@ public interface World { * @return */ public Boat spawnBoat(Location loc); + + /** + * Get a list of all entities. + * + * @return + */ + public List getEntities(); + + /** + * Get a list of all living entities. + * + * @return + */ + public List getLivingEntities(); /** * Gets the name of this world. This is not guaranteed to be unique. @@ -171,6 +188,7 @@ public interface World { * @return Id of this world */ public long getId(); + /** * Gets the default spawn location. */