testserver/Unmapped-Spigot-Server-Patches/0192-Tameable-getOwnerUniqu...

37 lines
1.7 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
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
2021-05-15 23:42:36 +00:00
index 62ccef35e4b4238c50faf778fbf3ea9a494ca387..5b66165471197aad57e23f9a6669b11f25a5e4f2 100644
--- 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
}
}
+ 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
2021-05-15 23:42:36 +00:00
index 3ac6623199f991ba16dbd62f4d6eed9982b22bcb..73a8ae346fb2ca5af172d96fa6b28e4d41a8c294 100644
--- 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
return (EntityTameableAnimal) super.getHandle();
}
+ public UUID getOwnerUniqueId() {
+ return getOwnerUUID();
+ }
public UUID getOwnerUUID() {
try {
return getHandle().getOwnerUUID();