mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Rename getOwnerUUID to Tameable#getOwnerUniqueId for consistency
for the @kashike, thanks for adding a server diff to use this name!
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 24 Feb 2018 00:55:52 -0500
|
||||
Subject: [PATCH] Tameable#getOwnerUUID API
|
||||
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.
|
||||
|
||||
This method is already implemented on the server, just needed to expose it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Tameable.java b/src/main/java/org/bukkit/entity/Tameable.java
|
||||
index 44497aa3..447628a8 100644
|
||||
index 44497aa3..0987c1e8 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Tameable.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Tameable.java
|
||||
@@ -0,0 +0,0 @@ public interface Tameable extends Entity {
|
||||
@@ -22,13 +20,13 @@ index 44497aa3..447628a8 100644
|
||||
+ *
|
||||
+ * @return the owners UUID, or null if not owned
|
||||
+ */
|
||||
+ public java.util.UUID getOwnerUUID();
|
||||
+ public java.util.UUID getOwnerUniqueId();
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Gets the current owning AnimalTamer
|
||||
*
|
||||
+ * @see #getOwnerUUID() Recommended to use UUID version instead of this for performance.
|
||||
+ * @see #getOwnerUniqueId() Recommended to use UUID version instead of this for performance.
|
||||
+ * This method will cause OfflinePlayer to be loaded from disk if the owner is not online.
|
||||
+ *
|
||||
* @return the owning AnimalTamer, or null if not owned
|
Reference in New Issue
Block a user