geforkt von Mirrors/Paper
SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
5c2d43ae39
Commit
afd79495ce
@ -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();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren