diff options
author | sk89q <the.sk89q@gmail.com> | 2011-01-26 12:03:21 -0800 |
---|---|---|
committer | sk89q <the.sk89q@gmail.com> | 2011-01-26 12:48:13 -0800 |
commit | 8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e (patch) | |
tree | e5f6491c32bf876f0466b368976f7e623ca2690c /src | |
parent | 30144a15d1847bd62afb0ab41d1b5a1b40aefce6 (diff) | |
download | bukkit-8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e.tar bukkit-8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e.tar.gz bukkit-8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e.tar.lz bukkit-8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e.tar.xz bukkit-8e927a84bb3af7931fc5a6d6f41260fc9aa1fe6e.zip |
Added methods to get a list of entities to World.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/World.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 7c35bcc6..046e884d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/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<Entity> getEntities(); + + /** + * Get a list of all living entities. + * + * @return + */ + public List<LivingEntity> 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. */ |