Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
f09fed894f
--- work/Bukkit Submodule work/Bukkit 6a4242cb..337955e3: > SPIGOT-5468: Improve Beehive TileEntity API > #473: Add an API for passing the heightmap to getHighestBlockAt* method --- work/CraftBukkit Submodule work/CraftBukkit 807a677e..708be695: > SPIGOT-5468: Improve Beehive TileEntity API > #624: Add an API for passing the heightmap to getHighestBlockAt* method > MC-135989, SPIGOT-5564: Don't kick players for flight while riptiding This deprecates the Paper getHighestBlockAt HeightMap APIs now that Bukkit has added their own. These methods will stick around long enough for people to migrate. Their API is pretty much the same as ours, migration should be quick and easy.
30 Zeilen
1008 B
Diff
30 Zeilen
1008 B
Diff
From 35945816d00a9dff5cedd0f1d8c4b0cb946a0409 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 a58337be3..f957d4272 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -1285,6 +1285,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.25.0
|
|
|