Specialized Menus
Customized wrappers for non-chest inventory types and complex logic.
AnvilMenu
Capture text input from players using the virtual anvil renaming slot. Includes built-in handlers for real-time rename tracking.
AnvilMenu anvil = new AnvilMenu();
anvil.onRename(text -> { ... });
anvil.onComplete((text, event) -> { ... });
PagedMenu
Perfect for large databases or player lists. Automatically handles slot filling across multiple pages with shared synchronization.
PagedMenu paged = new PagedMenu(6, contentSlots);
paged.addContent(button);
paged.createNextPageButton();
MerchantMenu
Create virtual villager trades without spawning an actual NPC. Perfect for custom shops and trading systems.
MerchantMenu menu = new MerchantMenu("Shop");
menu.addTrade(cost, result);
menu.open(player);
CraftingMenu
Provides a simplified 3x3 grid API for virtual crafting tables. Easily map coordinates (row, col) to crafting slots.
CraftingMenu menu = new CraftingMenu();
menu.setGridButton(1, 1, button);
menu.setResultButton(result);
Multi-Viewer Support
Every menu in InvLib supports multiple viewers out of the box. Updates to one slot are reflected instantly for everyone watching, making shared interfaces (like team-chests or communal crafting) easier than ever to implement.