Interface SkullDetails
-
public interface SkullDetailsDefines an interface of implementation-specific details and methods relating to a skull item/block. Generally, a set of Skull implementation details is available for each vanilla skull type. Depending on implemnentation, some of the block and item materials returned by methods here may be the same or different.- Author:
- crashdemons (crashenator at gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ItemStackcreateItemStack(int quantity)Create an ItemStack of a given quantity for this specific skull implementation.MaterialgetBlockMaterial(SkullBlockAttachment attachment)Gets the block material for a specific block attachment.MaterialgetFloorMaterial()Gets the bukkit material corresponding to a block of this skull placed on a floor (not against a wall)MaterialgetItemMaterial()Gets the bukkit material corresponding to an Item of this skullMaterialgetWallMaterial()Gets the bukkit material corresponding to a block of this skull placed against a wall (not on a floor or other placement)booleanisBackedByPlayerhead()Gets whether the skull must be implemented with a playerheadbooleanisSkinnable()Gets whether this skull, as implemented, is texturable or username-skinnable.booleanisVariant()Gets whether the skull is a variant type (legacy heads based on skeleton skull variants).BlocksetBlock(Location loc, BlockFace rotation, SkullBlockAttachment attachment)Sets a block in the world to the specific skull for this implementation.
-
-
-
Method Detail
-
isVariant
boolean isVariant()
Gets whether the skull is a variant type (legacy heads based on skeleton skull variants).- Returns:
- whether the skull is a variant type
-
isBackedByPlayerhead
boolean isBackedByPlayerhead()
Gets whether the skull must be implemented with a playerhead- Returns:
- whether the skull must be implemented with a playerhead
-
isSkinnable
boolean isSkinnable()
Gets whether this skull, as implemented, is texturable or username-skinnable.- Returns:
- whether this skull, as implemented, is texturable or username-skinnable.
-
createItemStack
ItemStack createItemStack(int quantity)
Create an ItemStack of a given quantity for this specific skull implementation.- Parameters:
quantity- the number of skulls to create in the stack- Returns:
- the itemstack that was created
-
setBlock
Block setBlock(Location loc, BlockFace rotation, SkullBlockAttachment attachment)
Sets a block in the world to the specific skull for this implementation. implementation.- Parameters:
loc- the location of the block to setrotation- the rotation of the skull block to useattachment- whether the block should be attached to the wall or floor- Returns:
- the block set, or null if it cannot be set.
- Since:
- 5.2.14-SNAPSHOT
-
getBlockMaterial
@NotNull Material getBlockMaterial(SkullBlockAttachment attachment)
Gets the block material for a specific block attachment. For some older implementations, this will be a constant value. If there is no type for the given attachment, a default type should be given instead.- Parameters:
attachment- how the block should be attached to others- Returns:
- The block material
- Since:
- 5.2.14-SNAPSHOT
-
getItemMaterial
Material getItemMaterial()
Gets the bukkit material corresponding to an Item of this skull- Returns:
- the material requested
-
getFloorMaterial
Material getFloorMaterial()
Gets the bukkit material corresponding to a block of this skull placed on a floor (not against a wall)- Returns:
- the material requested
-
getWallMaterial
Material getWallMaterial()
Gets the bukkit material corresponding to a block of this skull placed against a wall (not on a floor or other placement)- Returns:
- the material requested
-
-