Package org.bukkit.block

# Interface Skull

All Superinterfaces:
  `BlockState`, `Metadatable`, `PersistentDataHolder`, `TileState`

public interface Skull extends TileState
Represents a captured state of a skull block.

## Method Summary

Modifier and Type
Method
Description
`@Nullable String`
`getOwner()`
Deprecated.
See `getOwningPlayer()`.
`@Nullable PlayerProfile`
`getOwnerProfile()`
Deprecated.
`@Nullable OfflinePlayer`
`getOwningPlayer()`
Get the player which owns the skull.
`PlayerProfile`
`getPlayerProfile()`
If the skull has an owner, per `hasOwner()`, return the owners `PlayerProfile`
`@NotNull BlockFace`
`getRotation()`
Deprecated.
use `BlockData`
`@NotNull SkullType`
`getSkullType()`
Deprecated.
check `Material` instead
`boolean`
`hasOwner()`
Checks to see if the skull has an owner
`boolean`
`setOwner(@Nullable String name)`
Deprecated.
see `setOwningPlayer(org.bukkit.OfflinePlayer)`.
`void`
`setOwnerProfile(@Nullable PlayerProfile profile)`
Deprecated.
`void`
`setOwningPlayer(@NotNull OfflinePlayer player)`
Set the player which owns the skull.
`void`
`setPlayerProfile(PlayerProfile profile)`
Sets this skull to use the supplied Player Profile, which can include textures already prefilled.
`void`
`setRotation(@NotNull BlockFace rotation)`
Deprecated.
use `BlockData`
`void`
`setSkullType(SkullType skullType)`
Deprecated.
check `Material` instead

### Methods inherited from interface org.bukkit.block.BlockState

`getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, update`

### Methods inherited from interface org.bukkit.metadata.Metadatable

`getMetadata, hasMetadata, removeMetadata, setMetadata`

### Methods inherited from interface org.bukkit.block.TileState

`getPersistentDataContainer, isSnapshot`

## Method Details

### hasOwner

boolean hasOwner()
Checks to see if the skull has an owner

Returns:
  true if the skull has an owner

### getOwner

@Deprecated @Nullable @Nullable String getOwner()
Deprecated.
See `getOwningPlayer()`.
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

### setOwner

@Deprecated @Contract("null -> false") boolean setOwner(@Nullable @Nullable String name)
Deprecated.
see `setOwningPlayer(org.bukkit.OfflinePlayer)`.
Sets the owner of the skull

Involves 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

### getOwningPlayer

@Nullable @Nullable OfflinePlayer getOwningPlayer()
Get the player which owns the skull. This player may appear as the texture depending on skull type.

Returns:
  owning player

### setOwningPlayer

void setOwningPlayer(@NotNull @NotNull OfflinePlayer player)
Set the player which owns the skull. This player may appear as the texture depending on skull type.

Parameters:
  `player` - the owning player

### setPlayerProfile

void setPlayerProfile(@NotNull PlayerProfile profile)
Sets this skull to use the supplied Player Profile, which can include textures already prefilled.

Parameters:
  `profile` - The profile to set this Skull to use, may not be null

### getPlayerProfile

@Nullable PlayerProfile getPlayerProfile()
If the skull has an owner, per `hasOwner()`, return the owners `PlayerProfile`

Returns:
  The profile of the owner, if set

### getOwnerProfile

@Nullable @Deprecated @Nullable PlayerProfile getOwnerProfile()
Deprecated.
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

@Deprecated void setOwnerProfile(@Nullable @Nullable PlayerProfile profile)
Deprecated.
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

### getRotation

@Deprecated @NotNull @NotNull BlockFace getRotation()
Deprecated.
use `BlockData`
Gets the rotation of the skull in the world (or facing direction if this is a wall mounted skull).

Returns:
  the rotation of the skull

### setRotation

@Deprecated void setRotation(@NotNull @NotNull BlockFace rotation)
Deprecated.
use `BlockData`
Sets 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

### getSkullType

@Deprecated @NotNull @NotNull SkullType getSkullType()
Deprecated.
check `Material` instead
Gets the type of skull

Returns:
  the type of skull

### setSkullType

@Deprecated @Contract("_ -> fail") void setSkullType(SkullType skullType)
Deprecated.
check `Material` instead
Sets the type of skull

Parameters:
  `skullType` - the type of skull