Class BagItemFactory

java.lang.Object
valorless.havenbags.items.BagItemFactory

public final class BagItemFactory extends Object
Factory for creating the in-inventory representation of a Haven Bag.
  • Constructor Details

    • BagItemFactory

      public BagItemFactory()
  • Method Details

    • toItemStack

      public static org.bukkit.inventory.ItemStack toItemStack(@NotNull Data bag)
      Create an ItemStack representing the given bag data. - Uses Data.material if set; otherwise uses a player head with Data.texture if present; otherwise defaults to CHEST. - Applies name, custom model data, and a concise lore. - Stores identifying information in the PersistentDataContainer for later retrieval.
      Parameters:
      bag - Data instance
      Returns:
      ItemStack representing the bag