Package org.bukkit.block
Interface Skull
- All Superinterfaces:
BlockState
,Metadatable
public interface Skull extends BlockState
Represents a Skull
-
Method Summary
Modifier and Type Method Description java.lang.String
getOwner()
Gets the owner of the skull, if one existsBlockFace
getRotation()
Gets the rotation of the skull in the worldSkullType
getSkullType()
Gets the type of skullboolean
hasOwner()
Checks to see if the skull has an ownerboolean
setOwner(java.lang.String name)
Sets the owner of the skullvoid
setRotation(BlockFace rotation)
Sets the rotation of the skull in the worldvoid
setSkullType(SkullType skullType)
Sets the type of skullMethods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, isPlaced, setData, setRawData, setType, setTypeId, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
-
Method Details
-
hasOwner
boolean hasOwner()Checks to see if the skull has an owner- Returns:
- true if the skull has an owner
-
getOwner
java.lang.String getOwner()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
boolean setOwner(java.lang.String name)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
-
getRotation
BlockFace getRotation()Gets the rotation of the skull in the world- Returns:
- the rotation of the skull
-
setRotation
Sets the rotation of the skull in the world- Parameters:
rotation
- the rotation of the skull
-
getSkullType
SkullType getSkullType()Gets the type of skull- Returns:
- the type of skull
-
setSkullType
Sets the type of skull- Parameters:
skullType
- the type of skull
-