geforkt von Mirrors/Paper
9a7ca3dbc5
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: 564ed152 #482: Add a DragonBattle API to manipulate respawn phases etc 9f2fd967 #474: Add ability to set other plugin names as provided API so others can still depend on it CraftBukkit Changes:fc318cc1
#642: Add a DragonBattle API to manipulate respawn phases etc796eb15a
#644: Fix ChunkMapDistance#removeAllTicketsFor not propagating ticket level updatesa6f80937
SPIGOT-5606: call BlockRedstoneEvent for fence gates Spigot Changes: a03b1fdb Rebuild patches
30 Zeilen
1010 B
Diff
30 Zeilen
1010 B
Diff
From 79bd2ca7d9fa8e0c52298b9a0376b05c12bfd862 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 1787c2d205..588c87119f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1289,6 +1289,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.26.0
|
|
|