geforkt von Mirrors/Paper
b922ff9886
This only impacted people who used our useSnapshots new API in a plugin, which obviously was no one as the data result was completely broken. Merged the NPE check patch into mine since it has to handle it too.
40 Zeilen
1.6 KiB
Diff
40 Zeilen
1.6 KiB
Diff
From a5522b3c31b17b58d70663414748c0932f5f23ec 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 e56bef334..cc9d432e7 100644
|
|
--- 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
|
|
index eaaebeab8..2e959321b 100644
|
|
--- 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();
|
|
--
|
|
2.18.0
|
|
|