From d87fb0e92ba84f366ba48f278d48eea3208ebdbe Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Fri, 27 Jan 2012 21:47:16 -0600 Subject: Add getEntitiesByClass(Class) and getEntitiesByClasses(Class...), deprecate getEntitiesByClass(Class...) --- src/main/java/org/bukkit/World.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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,8 +347,23 @@ public interface World extends PluginMessageRecipient { * * @return A List of all Entities currently residing in this world that match the given class/interface */ + @Deprecated public Collection getEntitiesByClass(Class... 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 Collection getEntitiesByClass(Class 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 getEntitiesByClasses(Class... classes); + /** * Get a list of all players in this World * -- cgit v1.2.3