13
0
geforkt von Mirrors/Paper

SPIGOT-826: Add method to retrieve entity by UUID

By: Zach Brown <zach.brown@destroystokyo.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2017-01-04 21:28:31 -06:00
Ursprung 0bd65c1b02
Commit e63cab01fc

Datei anzeigen

@ -76,6 +76,7 @@ import org.bukkit.craftbukkit.util.CraftMagicNumbers;
import org.bukkit.craftbukkit.util.DatFileFilter; import org.bukkit.craftbukkit.util.DatFileFilter;
import org.bukkit.craftbukkit.util.Versioning; import org.bukkit.craftbukkit.util.Versioning;
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions; import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.inventory.InventoryType;
import org.bukkit.event.player.PlayerChatTabCompleteEvent; import org.bukkit.event.player.PlayerChatTabCompleteEvent;
@ -1662,6 +1663,13 @@ public final class CraftServer implements Server {
return new CraftBossBar(title, color, style, flags); return new CraftBossBar(title, color, style, flags);
} }
@Override
public Entity getEntity(UUID uuid) {
Validate.notNull(uuid, "UUID cannot be null");
net.minecraft.server.Entity entity = console.a(uuid); // PAIL: getEntity
return entity == null ? null : entity.getBukkitEntity();
}
@Deprecated @Deprecated
@Override @Override
public UnsafeValues getUnsafe() { public UnsafeValues getUnsafe() {