From 0d7c76b8b8abda694580589ff8aead9247d81c2f Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 24 Feb 2018 01:14:55 -0500 Subject: [PATCH] Tameable#getOwnerUniqueId API This is faster if all you need is the UUID, as .getOwner() will cause an OfflinePlayer to be loaded from disk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java index 9952db3eb5..1aea5f3f05 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java @@ -90,6 +90,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac } } + public UUID getOwnerUniqueId() { + return getOwnerUUID(); + } public UUID getOwnerUUID() { return getHandle().getOwnerUUID(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java index 5dfa40dda1..407b95cafd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java @@ -17,6 +17,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat return (EntityTameableAnimal)super.getHandle(); } + public UUID getOwnerUniqueId() { + return getOwnerUUID(); + } public UUID getOwnerUUID() { try { return getHandle().getOwnerUUID(); -- 2.25.1