From a785a9460e0d623006238fb1d931df5d7ceeacf2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 30 Mar 2016 09:41:12 -0500 Subject: [PATCH] Skip dead entities in getEntity(UUID) API --- Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch b/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch index 37296980f7..bb3c80bbcf 100644 --- a/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch +++ b/Spigot-Server-Patches/0123-Add-getEntity-by-UUID-API.patch @@ -1,11 +1,11 @@ -From eab823e7ef24a1d4a79f9cdc6efd9f7e169f7b2c Mon Sep 17 00:00:00 2001 +From 0e1abba6b1186ab06e0ed8ecf5ceb00c1494c2d3 Mon Sep 17 00:00:00 2001 From: DemonWav Date: Wed, 30 Mar 2016 01:20:11 -0500 Subject: [PATCH] Add getEntity by UUID API diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d628a32..d7ca53b 100644 +index d628a32..a785412 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1622,4 +1622,17 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -18,7 +18,7 @@ index d628a32..d7ca53b 100644 + Entity entity; + for (WorldServer world : worldServer) { + entity = world.getEntity(uuid); -+ if (entity != null) { ++ if (entity != null && !entity.dead) { + return entity; + } + }