Class ItemHeadCreator
java.lang.Object
com.github.pinont.singularitylib.api.items.ItemCreator
com.github.pinont.singularitylib.api.items.ItemHeadCreator
Specialized ItemCreator for creating player head items.
Extends ItemCreator to provide skull-specific functionality like setting the owner.
-
Constructor Summary
ConstructorsConstructorDescriptionItemHeadCreator(org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.inventory.ItemStack item) Creates a new ItemHeadCreator from an existing ItemStack. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackcreate()Creates the final ItemStack with all applied properties.Sets the display name of the item.Sets the owner of the skull, which determines the skin texture.Methods inherited from class ItemCreator
addAttribute, addEnchant, addInteraction, addItemFlag, addLore, addLore, addLore, addTag, addTag, addTags, clone, getAmount, getInteractions, getItemMeta, getKey, getName, getTagValue, getType, hasTag, removeTag, replaceTag, setAmount, setCannotMove, setDataContainer, setDurability, setDurability, setItemMeta, setModelData, setName, setTagValue, setType, setUnbreakable, setUnstackable
-
Constructor Details
-
ItemHeadCreator
public ItemHeadCreator(org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.inventory.ItemStack item) Creates a new ItemHeadCreator from an existing ItemStack.- Parameters:
item- the ItemStack to create from (should be a player head)
-
-
Method Details
-
setName
Description copied from class:ItemCreatorSets the display name of the item.- Overrides:
setNamein classItemCreator- Parameters:
displayName- the display name to set- Returns:
- this ItemCreator for method chaining
-
setOwner
Sets the owner of the skull, which determines the skin texture.- Parameters:
owner- the username of the player whose skin to use- Returns:
- this ItemHeadCreator for method chaining
-
create
public org.bukkit.inventory.ItemStack create()Description copied from class:ItemCreatorCreates the final ItemStack with all applied properties.- Overrides:
createin classItemCreator- Returns:
- the created ItemStack
-