3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-18 05:50:04 +01:00
Paper/Spigot-API-Patches/0033-Add-getEntity-by-UUID-API.patch

48 Zeilen
1.5 KiB
Diff

From 1ec57a41072c805aeeb8efb10cac8b4738cb4aab Mon Sep 17 00:00:00 2001
2016-03-30 08:20:36 +02: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
index b01cd7d..3161b87 100644
2016-03-30 08:20:36 +02:00
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -1189,6 +1189,16 @@ public final class Bukkit {
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
index b527372..edf0d04 100644
2016-03-30 08:20:36 +02:00
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -1020,4 +1020,12 @@ public interface Server extends PluginMessageRecipient {
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
}
--
2.9.2.windows.1
2016-03-30 08:20:36 +02:00