mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01:00
73bd35d076
Upstream has released updates that appear 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: 218294b1 PR-743: Support setting individual Wither head targets CraftBukkit Changes: d48f2d1a PR-1047: Support setting individual Wither head targets 518f1bee SPIGOT-6948: Motion from Explosion after Respawn f3c7a6ac SPIGOT-7019: Add yaw in World#getSpawnLocation
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 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 ffcaf40f8e310ef4ed292dac673a4e1da6dff0ea..b456bb99db2cd0e48e44796063dc7da7eee64451 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1041,6 +1041,15 @@ public class CraftWorld extends CraftRegionAccessor 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.world.entity.Entity entity = world.getEntity(uuid);
|
|
+ return entity == null ? null : entity.getBukkitEntity();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public void save() {
|
|
org.spigotmc.AsyncCatcher.catchOp("world save"); // Spigot
|