diff --git a/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch b/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch index c85b9c09ad..39d03f1b65 100644 --- a/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch +++ b/Spigot-Server-Patches/0122-Add-getEntity-by-UUID-API.patch @@ -1,14 +1,14 @@ -From 88d6d362e1437fc065603bbbb558448ff2443d52 Mon Sep 17 00:00:00 2001 +From d229df3e11a546bfc6fc7016a72633c4efbcec02 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 058735e..0c037ff 100644 +index 058735e..06dec17 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 +@@ -1622,4 +1622,20 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null; } // CraftBukkit end @@ -17,6 +17,9 @@ index 058735e..0c037ff 100644 + public Entity getEntity(UUID uuid) { + Entity entity; + for (WorldServer world : worldServer) { ++ if (world == null) { ++ continue; ++ } + entity = world.getEntity(uuid); + if (entity != null && !entity.dead) { + return entity;