diff options
author | md_5 <git@md-5.net> | 2017-09-06 16:14:08 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-09-06 16:14:08 +1000 |
commit | 5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa (patch) | |
tree | a73524a013f3fec8070ed3509e74acffa5aba10d /src/main/java | |
parent | a9d0c37ce4142bb7e4ccb9ef0668aec2828f6294 (diff) | |
download | bukkit-5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa.tar bukkit-5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa.tar.gz bukkit-5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa.tar.lz bukkit-5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa.tar.xz bukkit-5d0b5b9c25730a2c77af6e3b12bb8fe0329fcdfa.zip |
SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/inventory/meta/SkullMeta.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java index fab31190..c60860e1 100644 --- a/src/main/java/org/bukkit/inventory/meta/SkullMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/SkullMeta.java @@ -1,6 +1,7 @@ package org.bukkit.inventory.meta; import org.bukkit.Material; +import org.bukkit.OfflinePlayer; /** * Represents a skull ({@link Material#SKULL_ITEM}) that can have an owner. @@ -11,7 +12,9 @@ public interface SkullMeta extends ItemMeta { * Gets the owner of the skull. * * @return the owner if the skull + * @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}. */ + @Deprecated String getOwner(); /** @@ -29,8 +32,28 @@ public interface SkullMeta extends ItemMeta { * * @param owner the new owner of the skull * @return true if the owner was successfully set + * @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}. */ + @Deprecated boolean setOwner(String owner); + /** + * Gets the owner of the skull. + * + * @return the owner if the skull + */ + OfflinePlayer getOwningPlayer(); + + /** + * Sets the owner of the skull. + * <p> + * Plugins should check that hasOwner() returns true before calling this + * plugin. + * + * @param owner the new owner of the skull + * @return true if the owner was successfully set + */ + boolean setOwningPlayer(OfflinePlayer owner); + SkullMeta clone(); } |