PaperMC/Spigot-API-Patches/0117-Add-World.getEntity-UUID-API.patch

31 lines
1,006 B
Diff
Raw Normal View History

2018-10-27 06:02:22 +02:00
From 596f70a064c3481f5197b4b17cd4126e9dd8799a Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:07:16 +0200
Subject: [PATCH] Add World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
2018-10-27 06:02:22 +02:00
index e83b2ac7..7c700cc2 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
2018-10-27 06:02:22 +02:00
@@ -705,6 +705,16 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Collection<Entity> getNearbyEntities(Location location, double x, double y, double z);
+ // Paper start - getEntity by UUID API
+ /**
+ * Gets an entity in this world 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 Entity getEntity(UUID uuid);
+ // Paper end
+
/**
2018-10-27 06:02:22 +02:00
* Returns a list of entities within a bounding box centered around a
* Location.
--
2018-10-27 06:02:22 +02:00
2.19.1