aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0177-Tameable-getOwnerUniqueId-API.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2021-11-23 15:03:50 +0100
committerMiniDigger | Martin <[email protected]>2021-11-30 19:26:33 +0100
commit6f3591fd6d8348f6a5caa69762847d34f7edaffc (patch)
tree1338dcf812ad6e6b65e56a62395f845812469577 /patches/server/0177-Tameable-getOwnerUniqueId-API.patch
parentd7cdc72bdfeb2cbc0856c330b3d52ac998ccb82a (diff)
downloadPaper-6f3591fd6d8348f6a5caa69762847d34f7edaffc.tar.gz
Paper-6f3591fd6d8348f6a5caa69762847d34f7edaffc.zip
More more more more more work
Diffstat (limited to 'patches/server/0177-Tameable-getOwnerUniqueId-API.patch')
-rw-r--r--patches/server/0177-Tameable-getOwnerUniqueId-API.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/patches/server/0177-Tameable-getOwnerUniqueId-API.patch b/patches/server/0177-Tameable-getOwnerUniqueId-API.patch
new file mode 100644
index 0000000000..842a58904b
--- /dev/null
+++ b/patches/server/0177-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 6151df2086d92fd5f428e2efe0df8d1c154ff891..32c7dc33ac0a41902bc841692a8b64b18e4355b6 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+@@ -89,6 +89,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 f225da459d0c9b5b5322ba3256e63880a7b4ad5d..428437970cac144be53cd0e30af7af0cd1ce603b 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();