2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-02-24 07:16:01 +01: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-06-25 15:11:48 +02:00
|
|
|
index 8c59b9ce12d4148b209c3824d44f6e9c736de16c..218a2190d1203ca0fbc2a5ad87e145f436aac314 100644
|
2018-02-24 07:16:01 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
2019-05-06 04:58:04 +02:00
|
|
|
@@ -90,6 +90,9 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
|
2018-02-24 07:16:01 +01: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-06-25 15:11:48 +02:00
|
|
|
index 58d9cd8172dcb8d3df93355d8ff51053b7469c45..6a642155cf387f7d0e2cf9bdf1a78c62aef8205b 100644
|
2018-02-24 07:16:01 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
2019-04-28 19:59:47 +02:00
|
|
|
@@ -17,6 +17,9 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat
|
2020-04-27 09:34:45 +02:00
|
|
|
return (EntityTameableAnimal) super.getHandle();
|
2018-02-24 07:16:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+ public UUID getOwnerUniqueId() {
|
|
|
|
+ return getOwnerUUID();
|
|
|
|
+ }
|
|
|
|
public UUID getOwnerUUID() {
|
|
|
|
try {
|
|
|
|
return getHandle().getOwnerUUID();
|