🛠️ Features
- Anti-Steal: Players cannot drop, move, or swap these items.
- Auto-Restore: If a button is lost (e.g., due to a server crash or world change), the extension automatically re-populates the designated slot.
- NBT-Based: Buttons are identified by unique Persistent Data (PDC) keys, ensuring regular items with the same material are never affected.
📦 Crafting Grid Buttons
A unique feature of this extension is the ability to place buttons within the 2x2 (Inventory) or 3x3 (Workbench) crafting grid.- Slot 0: The crafting result slot.
- Slots 1-4: The crafting matrix slots.
isCraftingGrid: true, you can turn the crafting area into a permanent control panel for your players.
Pro Tip: You can place an item in Slot 0 (Result) to act as a “Submit” or “Process” button that triggers a script when clicked, while using Slots 1-4 as status indicators.
⚙️ Technical Details
TheInventoryButtonService monitors:
InventoryClickEvent: Cancels any attempt to pick up or move the button.InventoryDragEvent: Prevents dragging buttons across slots.PlayerDropItemEvent: Blocks dropping the buttons on the ground.PlayerSwapHandItemsEvent: Prevents swapping buttons to the off-hand.