Package valorless.havenbags.items
Class BagItemFactory
java.lang.Object
valorless.havenbags.items.BagItemFactory
Factory for creating the in-inventory representation of a Haven Bag.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStacktoItemStack(Data bag) Create an ItemStack representing the given bag data.
-
Constructor Details
-
BagItemFactory
public BagItemFactory()
-
-
Method Details
-
toItemStack
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
-