Paper/Spigot-Server-Patches/0244-Implement-World.getEntity-UUID-API.patch
Shane Freeder eee1a019f9
Updated Upstream (CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
2012f1e0 SPIGOT-5269: Item attribute modifiers don't persist their order
7a806a3a SPIGOT-5270: Call BlockSpreadEvent when bamboo saplings grow

Spigot Changes:
798ea6ab Add async catcher to World#save
2019-08-17 04:26:58 +01:00

30 Zeilen
1008 B
Diff

From 4cad924d4ab368e3962e1c69158bac777bb459b3 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 3 Jul 2018 16:08:14 +0200
Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index d75ac36aa..5e53ee010 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1207,6 +1207,15 @@ public class CraftWorld implements World {
return list;
}
+ // Paper start - getEntity by UUID API
+ @Override
+ public Entity getEntity(UUID uuid) {
+ Validate.notNull(uuid, "UUID cannot be null");
+ net.minecraft.server.Entity entity = world.getEntity(uuid);
+ return entity == null ? null : entity.getBukkitEntity();
+ }
+ // Paper end
+
@Override
public void save() {
org.spigotmc.AsyncCatcher.catchOp("world save"); // Spigot
--
2.22.0