mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
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 commit is contained in:
parent
f229e2c798
commit
4198da1e99
1 changed files with 14 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
package org.bukkit.entity;
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
public interface Tameable extends Animals {
|
public interface Tameable extends Animals {
|
||||||
|
@ -25,9 +26,22 @@ public interface Tameable extends Animals {
|
||||||
*/
|
*/
|
||||||
public void setTamed(boolean tame);
|
public void setTamed(boolean tame);
|
||||||
|
|
||||||
|
// Paper start
|
||||||
|
/**
|
||||||
|
* Gets the owners UUID
|
||||||
|
*
|
||||||
|
* @return the owners UUID, or null if not owned
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
public java.util.UUID getOwnerUniqueId();
|
||||||
|
// Paper end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the current owning AnimalTamer
|
* Gets the current owning AnimalTamer
|
||||||
*
|
*
|
||||||
|
* @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
|
* @return the owning AnimalTamer, or null if not owned
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|
Loading…
Reference in a new issue