2018-10-05 03:18:46 +00:00
|
|
|
From 0caca786108d71c213532dbb058efd5f5bb3a771 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
|
2018-07-23 08:39:55 +00:00
|
|
|
index e56bef3340..cc9d432e7f 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
|
|
|
|
@@ -83,6 +83,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
|
2018-07-23 08:39:55 +00:00
|
|
|
index eaaebeab83..2e959321b5 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
|
|
|
|
@@ -18,6 +18,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();
|
|
|
|
--
|
2018-09-28 23:31:59 +00:00
|
|
|
2.19.0
|
2018-02-24 06:16:01 +00:00
|
|
|
|