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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description @Nullable StringgetOwner()Deprecated.SeegetOwningPlayer().@Nullable OfflinePlayergetOwningPlayer()Get the player which owns the skull.@NotNull BlockFacegetRotation()Deprecated.useBlockData@NotNull SkullTypegetSkullType()Deprecated.checkMaterialinsteadbooleanhasOwner()Checks to see if the skull has an ownerbooleansetOwner(@Nullable String name)Deprecated.voidsetOwningPlayer(@NotNull OfflinePlayer player)Set the player which owns the skull.voidsetRotation(@NotNull BlockFace rotation)Deprecated.useBlockDatavoidsetSkullType(SkullType skullType)Deprecated.checkMaterialinstead-
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, 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
-
-
-
-
Method Detail
-
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.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
-
setOwner
@Deprecated @Contract("null -> false") boolean setOwner(@Nullable @Nullable String name)
Deprecated.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
-
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
-
getRotation
@Deprecated @NotNull @NotNull BlockFace getRotation()
Deprecated.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
-
setRotation
@Deprecated void setRotation(@NotNull @NotNull BlockFace rotation)
Deprecated.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
-
getSkullType
@Deprecated @NotNull @NotNull SkullType getSkullType()
Deprecated.checkMaterialinsteadGets the type of skull- Returns:
- the type of skull
-
setSkullType
@Deprecated @Contract("_ -> fail") void setSkullType(SkullType skullType)
Deprecated.checkMaterialinsteadSets the type of skull- Parameters:
skullType- the type of skull
-
-