mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta
This commit is contained in:
parent
a9d0c37ce4
commit
5d0b5b9c25
1 changed files with 23 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
package org.bukkit.inventory.meta;
|
package org.bukkit.inventory.meta;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.OfflinePlayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a skull ({@link Material#SKULL_ITEM}) that can have an owner.
|
* 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.
|
* Gets the owner of the skull.
|
||||||
*
|
*
|
||||||
* @return the owner if the skull
|
* @return the owner if the skull
|
||||||
|
* @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
String getOwner();
|
String getOwner();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,8 +32,28 @@ public interface SkullMeta extends ItemMeta {
|
||||||
*
|
*
|
||||||
* @param owner the new owner of the skull
|
* @param owner the new owner of the skull
|
||||||
* @return true if the owner was successfully set
|
* @return true if the owner was successfully set
|
||||||
|
* @deprecated see {@link #setOwningPlayer(org.bukkit.OfflinePlayer)}.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
boolean setOwner(String owner);
|
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();
|
SkullMeta clone();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue