Package org.bukkit.inventory.meta
Interface SkullMeta
- All Superinterfaces:
Cloneable
,ConfigurationSerializable
,ItemMeta
,PersistentDataHolder
Represents a skull that can have an owner.
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getOwner()
Deprecated.Gets the profile of the player who owns the skull.Gets the owner of the skull.boolean
hasOwner()
Checks to see if the skull has an owner.boolean
Deprecated.void
setOwnerProfile
(PlayerProfile profile) Sets the profile of the player who owns the skull.boolean
setOwningPlayer
(OfflinePlayer owner) Sets the owner of the skull.Methods inherited from interface org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
Methods inherited from interface org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setLocalizedName, setLore, setUnbreakable, setVersion
Methods inherited from interface org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
Method Details
-
getOwner
Deprecated.seegetOwningPlayer()
.Gets the owner of the skull.- Returns:
- the owner if the skull
-
hasOwner
boolean hasOwner()Checks to see if the skull has an owner.- Returns:
- true if the skull has an owner
-
setOwner
Deprecated.Sets the owner of the skull.- Parameters:
owner
- the new owner of the skull- Returns:
- true if the owner was successfully set
-
getOwningPlayer
Gets the owner of the skull.- Returns:
- the owner if the skull
-
setOwningPlayer
Sets the owner of the skull.Plugins should check that hasOwner() returns true before calling this plugin.
- Parameters:
owner
- the new owner of the skull- Returns:
- true if the owner was successfully set
-
getOwnerProfile
Gets the profile of the player who owns the skull. This player profile may appear as the texture depending on skull type.- Returns:
- the profile of the owning player
-
setOwnerProfile
Sets the profile of the player who owns the skull. This player profile may appear as the texture depending on skull type.The profile must contain both a unique id and a skin texture. If either of these is missing, the profile must contain a name by which the server will then attempt to look up the unique id and skin texture.
- Parameters:
profile
- the profile of the owning player- Throws:
IllegalArgumentException
- if the profile does not contain the necessary information
-
clone
-
getOwningPlayer()
.