papermc/Spigot-API-Patches/0033-Add-getEntity-by-UUID-API.patch

48 lines
1.5 KiB
Diff
Raw Normal View History

2016-12-20 22:34:27 +00:00
From d103b8d2293a1ceeb3ac328711f78cffe566098d Mon Sep 17 00:00:00 2001
2016-03-30 06:20:36 +00:00
From: DemonWav <demonwav@gmail.com>
Date: Wed, 30 Mar 2016 01:19:51 -0500
Subject: [PATCH] Add getEntity by UUID API
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
2016-11-21 21:51:27 +00:00
index 1e98f39..eb6fb2c 100644
2016-03-30 06:20:36 +00:00
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
2016-11-21 21:51:27 +00:00
@@ -1182,6 +1182,16 @@ public final class Bukkit {
2016-03-30 06:20:36 +00:00
public static void reloadPermissions() {
server.reloadPermissions();
}
+
+ /**
+ * Find an entity on the server by its UUID
+ *
+ * @param uuid The UUID of the entity
+ * @return The entity that is identified by the given UUID, or null if one isn't found
+ */
+ public static Entity getEntity(UUID uuid) {
+ return server.getEntity(uuid);
+ }
// Paper end
public static Server.Spigot spigot()
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
2016-12-20 22:34:27 +00:00
index 1b682b5..c2b61f1 100644
2016-03-30 06:20:36 +00:00
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
2016-12-20 22:34:27 +00:00
@@ -1017,4 +1017,12 @@ public interface Server extends PluginMessageRecipient {
2016-03-30 06:20:36 +00:00
Spigot spigot();
void reloadPermissions(); // Paper
+
+ /**
+ * Find an entity on the server by its UUID
+ *
+ * @param uuid The UUID of the entity
+ * @return The entity that is identified by the given UUID, or null if one isn't found
+ */
+ Entity getEntity(UUID uuid); // Paper
}
--
2016-12-20 22:34:27 +00:00
2.9.3
2016-03-30 06:20:36 +00:00