mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
37 lines
1.7 KiB
Diff
37 lines
1.7 KiB
Diff
|
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
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
|
||
|
@@ -0,0 +0,0 @@ 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
|
||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
||
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
|
||
|
@@ -0,0 +0,0 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat
|
||
|
return (TamableAnimal) super.getHandle();
|
||
|
}
|
||
|
|
||
|
+ public UUID getOwnerUniqueId() {
|
||
|
+ return getOwnerUUID();
|
||
|
+ }
|
||
|
public UUID getOwnerUUID() {
|
||
|
try {
|
||
|
return getHandle().getOwnerUUID();
|