Feature Request
SlotItem should support more ItemStack customization options like enchantments, custom model data, item flags, and durability.
Problem
The current SlotItem only supports basic properties (name, slot, material, quantity). For common GUI features like:
- Enchanted items to indicate special status
- Custom model data for resource pack integration
- Item flags to hide attributes
- Durability for damaged items
Developers must fall back to manual ItemStack creation, defeating the library's purpose.
Proposed Solutions
Option 1: Expand SlotItem constructor
Add optional parameters with default values:
newSlotItem(name, slot, material, quantity, lore, enchantments, customModelData, flags, durability)
Option 2: Builder pattern (preferred)
SlotItem.builder()
.name(Component.text("Special Item"))
.slot(0)
.material(Material.DIAMOND_SWORD)
.quantity(1)
.lore(...)
.enchantment(Enchantment.SHARPNESS, 5)
.customModelData(1234)
.flag(ItemFlag.HIDE_ATTRIBUTES)
.durability(500)
.build();Option 3: Keep SlotItem simple, add ItemCustomizer
menu.addItem(slot, baseItem)
.withEnchantment(Enchantment.SHARPNESS, 5)
.withCustomModelData(1234);
Use Cases
- Enchanted books in GUI libraries
- Custom textured items via resource packs
- Progress indicators with durability
- Hidden attribute items for cleaner display
Benefits
- Complete GUI creation without manual ItemStack manipulation
- Cleaner, more maintainable code
- Better integration with modern Minecraft features
Feature Request
SlotItem should support more ItemStack customization options like enchantments, custom model data, item flags, and durability.
Problem
The current SlotItem only supports basic properties (name, slot, material, quantity). For common GUI features like:
Developers must fall back to manual ItemStack creation, defeating the library's purpose.
Proposed Solutions
Option 1: Expand SlotItem constructor
Add optional parameters with default values:
Option 2: Builder pattern (preferred)
Option 3: Keep SlotItem simple, add ItemCustomizer
Use Cases
Benefits