Paper/Spigot-Server-Patches/0240-Implement-World.getEntity-UUID-API.patch
Shane Freeder d413dca4ee
Updated Upstream (Bukkit/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

Bukkit Changes:
333b9f02 SPIGOT-5422: Add support for 3-dimensional biomes
170d7386 Fix bad link in deprecated FlowerPot MaterialData class

CraftBukkit Changes:
16dc5758 SPIGOT-5449: Fix issue with projectiles
fd25653f SPIGOT-5448: Shulker Boxes collapse empty slots when picked up
b97d581a SPIGOT-5443: BEE_NEST BlockState
73698cf8 SPIGOT-5442: Fix issue with fire charges
beff9fb9 SPIGOT-5437: Fix CustomChunkGenerator.CustomBiomeGrid ignoring the y value for biomes
f777640e SPIGOT-5425: Prevent empty/air loot (again?)
db0dafb1 SPIGOT-5422: Add support for 3-dimensional biomes
4633e6c5 Fix crash with disabled worlds

Spigot Changes:
f39a89ef SPIGOT-5423: Remove covariant type change to give better chance of Java downgrades working
2019-12-13 14:08:40 +00:00

30 lines
1,008 B
Diff

From b8d16f5bd4c542d07b85f6b59001a8f98555a543 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 c31737d35..022eefc67 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1267,6 +1267,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.24.1