aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0171-Tameable-getOwnerUniqueId-API.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0171-Tameable-getOwnerUniqueId-API.patch')
-rw-r--r--patches/server/0171-Tameable-getOwnerUniqueId-API.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/server/0171-Tameable-getOwnerUniqueId-API.patch b/patches/server/0171-Tameable-getOwnerUniqueId-API.patch
new file mode 100644
index 0000000000..739f4d8b9c
--- /dev/null
+++ b/patches/server/0171-Tameable-getOwnerUniqueId-API.patch
@@ -0,0 +1,38 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+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 81c34b5245133cdd119f36c6bc084fb8d99f97f8..264b3fb45c47fbb6be78262838a5c0438860915f 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+@@ -88,6 +88,10 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
+ }
+ }
+
++ @Override
++ public UUID getOwnerUniqueId() {
++ return getOwnerUUID();
++ }
+ public UUID getOwnerUUID() {
+ return this.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 8df43597e4d60be875c27c65e0e5c69ad60d5ce2..a06679e1e5686d9bd601b3dcf8492add58918bc4 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
+@@ -17,6 +17,10 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat
+ return (TamableAnimal) super.getHandle();
+ }
+
++ @Override
++ public UUID getOwnerUniqueId() {
++ return getOwnerUUID();
++ }
+ public UUID getOwnerUUID() {
+ try {
+ return this.getHandle().getOwnerUUID();