Package org.bukkit.block
Interface Skull
- All Superinterfaces:
- BlockState,- Metadatable,- PersistentDataHolder,- TileState
Represents a captured state of a skull block.
- 
Method SummaryModifier and TypeMethodDescriptionGets the sound to play if the skull is placed on a note block.getOwner()Deprecated.Gets the profile of the player who owns the skull.Get the player which owns the skull.Deprecated.useBlockDataDeprecated.checkMaterialinsteadbooleanhasOwner()Checks to see if the skull has an ownervoidsetNoteBlockSound(NamespacedKey noteBlockSound) Sets the sound to play if the skull is placed on a note block.booleanDeprecated.voidsetOwnerProfile(PlayerProfile profile) Sets the profile of the player who owns the skull.voidsetOwningPlayer(OfflinePlayer player) Set the player which owns the skull.voidsetRotation(BlockFace rotation) Deprecated.useBlockDatavoidsetSkullType(SkullType skullType) Deprecated.checkMaterialinsteadMethods inherited from interface org.bukkit.block.BlockStatecopy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer
- 
Method Details- 
hasOwnerboolean hasOwner()Checks to see if the skull has an owner- Returns:
- true if the skull has an owner
 
- 
getOwnerDeprecated.SeegetOwningPlayer().Gets the owner of the skull, if one exists- Returns:
- the owner of the skull or null if the skull does not have an owner
 
- 
setOwnerDeprecated.Sets the owner of the skullInvolves a potentially blocking web request to acquire the profile data for the provided name. - Parameters:
- name- the new owner of the skull
- Returns:
- true if the owner was successfully set
 
- 
getOwningPlayerGet the player which owns the skull. This player may appear as the texture depending on skull type.- Returns:
- owning player
 
- 
setOwningPlayerSet the player which owns the skull. This player may appear as the texture depending on skull type.- Parameters:
- player- the owning player
 
- 
getOwnerProfileGets 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
 
- 
setOwnerProfileSets 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
 
- 
getNoteBlockSoundGets the sound to play if the skull is placed on a note block.
 Note: This only works for player heads. For other heads, seeInstrument.- Returns:
- the key of the sound, or null
 
- 
setNoteBlockSoundSets the sound to play if the skull is placed on a note block.
 Note: This only works for player heads. For other heads, seeInstrument.- Parameters:
- noteBlockSound- the key of the sound to be played, or null
 
- 
getRotationDeprecated.useBlockDataGets the rotation of the skull in the world (or facing direction if this is a wall mounted skull).- Returns:
- the rotation of the skull
 
- 
setRotationDeprecated.useBlockDataSets the rotation of the skull in the world (or facing direction if this is a wall mounted skull).- Parameters:
- rotation- the rotation of the skull
 
- 
getSkullTypeDeprecated.checkMaterialinsteadGets the type of skull- Returns:
- the type of skull
 
- 
setSkullTypeDeprecated.checkMaterialinsteadSets the type of skull- Parameters:
- skullType- the type of skull
 
 
- 
getOwningPlayer().