summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Primm <mike@primmhome.com>2012-01-27 21:47:16 -0600
committerEvilSeph <evilseph@gmail.com>2012-02-18 21:36:06 -0500
commitd87fb0e92ba84f366ba48f278d48eea3208ebdbe (patch)
tree3fe367b0f70bd1af9025a2d1ae56d59ecfaf06c5 /src
parent43457430be3969948dffad476f4119c2a93ba84f (diff)
downloadbukkit-d87fb0e92ba84f366ba48f278d48eea3208ebdbe.tar
bukkit-d87fb0e92ba84f366ba48f278d48eea3208ebdbe.tar.gz
bukkit-d87fb0e92ba84f366ba48f278d48eea3208ebdbe.tar.lz
bukkit-d87fb0e92ba84f366ba48f278d48eea3208ebdbe.tar.xz
bukkit-d87fb0e92ba84f366ba48f278d48eea3208ebdbe.zip
Add getEntitiesByClass(Class<T>) and getEntitiesByClasses(Class<?>...), deprecate getEntitiesByClass(Class<T>...)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/World.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 22c01bd0..53a1c5a1 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -347,9 +347,24 @@ public interface World extends PluginMessageRecipient {
*
* @return A List of all Entities currently residing in this world that match the given class/interface
*/
+ @Deprecated
public <T extends Entity> Collection<T> getEntitiesByClass(Class<T>... classes);
/**
+ * Get a collection of all entities in this World matching the given class/interface
+ *
+ * @return A List of all Entities currently residing in this world that match the given class/interface
+ */
+ public <T extends Entity> Collection<T> getEntitiesByClass(Class<T> cls);
+
+ /**
+ * Get a collection of all entities in this World matching any of the given classes/interfaces
+ *
+ * @return A List of all Entities currently residing in this world that match one or more of the given classes/interfaces
+ */
+ public Collection<Entity> getEntitiesByClasses(Class<?>... classes);
+
+ /**
* Get a list of all players in this World
*
* @return A list of all Players currently residing in this world