2020-05-01 22:03:47 +00:00
|
|
|
From 0e9ec3a5ebf224d4bb29ac534caace3fd2d11cd3 Mon Sep 17 00:00:00 2001
|
2018-02-24 06:16:01 +00:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
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
|
2020-04-27 07:34:45 +00:00
|
|
|
index 9952db3eb5..1aea5f3f05 100644
|
2018-02-24 06:16:01 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
2019-05-06 02:58:04 +00:00
|
|
|
@@ -90,6 +90,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
|
2018-02-24 06:16:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ 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
|
2020-04-27 07:34:45 +00:00
|
|
|
index bff9854f30..286d1194f2 100644
|
2018-02-24 06:16:01 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
2019-04-28 17:59:47 +00:00
|
|
|
@@ -17,6 +17,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat
|
2020-04-27 07:34:45 +00:00
|
|
|
return (EntityTameableAnimal) super.getHandle();
|
2018-02-24 06:16:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
+ public UUID getOwnerUniqueId() {
|
|
|
|
+ return getOwnerUUID();
|
|
|
|
+ }
|
|
|
|
public UUID getOwnerUUID() {
|
|
|
|
try {
|
|
|
|
return getHandle().getOwnerUUID();
|
|
|
|
--
|
2020-04-27 07:34:45 +00:00
|
|
|
2.26.2
|
2018-02-24 06:16:01 +00:00
|
|
|
|