diff options
-rw-r--r-- | src/main/java/org/bukkit/Bukkit.java | 10 | ||||
-rw-r--r-- | src/main/java/org/bukkit/Server.java | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java index ce6b761d..cadbbcad 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1142,6 +1142,16 @@ public final class Bukkit { } /** + * Gets an entity on the server by its UUID + * + * @param uuid the UUID of the entity + * @return the entity with the given UUID, or null if it isn't found + */ + public static Entity getEntity(UUID uuid) { + return server.getEntity(uuid); + } + + /** * @see UnsafeValues * @return the unsafe values instance */ diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index c25fe223..4c03a997 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -936,6 +936,14 @@ public interface Server extends PluginMessageRecipient { BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag ...flags); /** + * Gets an entity on the server by its UUID + * + * @param uuid the UUID of the entity + * @return the entity with the given UUID, or null if it isn't found + */ + Entity getEntity(UUID uuid); + + /** * @see UnsafeValues * @return the unsafe values instance */ |