mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
eee1a019f9
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 order7a806a3a
SPIGOT-5270: Call BlockSpreadEvent when bamboo saplings grow Spigot Changes: 798ea6ab Add async catcher to World#save
29 lines
1,008 B
Diff
29 lines
1,008 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
|
|
|