mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
a981965852
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: b302317a SPIGOT-5877: Add scaffolding for custom dimensions and biomes ccccb625 SPIGOT-6417: Add Creeper fuse ticks API CraftBukkit Changes: 0e26ddb6 SPIGOT-5877: Add scaffolding for custom dimensions and biomes 170d6feb SPIGOT-6417: Add Creeper fuse ticks API
27 lines
1.0 KiB
Diff
27 lines
1.0 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 0542623a0157e7df9717e3e641e34a6b8527d835..284a554eb3d94c9b0807d6c84aafaa4680d671ea 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1311,6 +1311,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.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
|