From 9f2ca0a8448547ac79aba4ac6f5313c95fd3e3ec Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 27 Jan 2012 21:47:16 -0600 Subject: [PATCH] Add getEntitiesByClass(Class) and getEntitiesByClasses(Class...), deprecate getEntitiesByClass(Class...) By: Mike Primm --- paper-api/src/main/java/org/bukkit/World.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java index 22c01bd0c..53a1c5a1d 100644 --- a/paper-api/src/main/java/org/bukkit/World.java +++ b/paper-api/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 *