Class ItemHeadCreator

java.lang.Object
com.github.pinont.singularitylib.api.items.ItemCreator
com.github.pinont.singularitylib.api.items.ItemHeadCreator

public class ItemHeadCreator extends ItemCreator
Specialized ItemCreator for creating player head items. Extends ItemCreator to provide skull-specific functionality like setting the owner.
  • 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

      public ItemCreator setName(String displayName)
      Description copied from class: ItemCreator
      Sets the display name of the item.
      Overrides:
      setName in class ItemCreator
      Parameters:
      displayName - the display name to set
      Returns:
      this ItemCreator for method chaining
    • setOwner

      public ItemHeadCreator setOwner(@NotNull @NotNull String owner)
      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: ItemCreator
      Creates the final ItemStack with all applied properties.
      Overrides:
      create in class ItemCreator
      Returns:
      the created ItemStack