HomeJavaModsInventoryInterface Library
InventoryInterface Library
InventoryInterface Library

1. Overview
2. How to use
3. Source



1. Overview
Simple API to create awesome InventoryInterfaces
Great for creating pretty much everything with an inventory.
For example: Shop-Plugins, Polls, Hub-Swiching and all sorts of configuration.

This plugin works by coupling Inventory Slots with InventoryRunnables.
The Runnables have a run(InventoryClickEvent) method that gets
called if a player clicks the slot.

2. How to use:

Create and register an IInventory:
Code (Text):
IInventory inv = InventoryInterface.registerInventory(int rows, String title);
OR
Code (Text):
IInventory inv = new IInventory(int rows, String title, boolean temporal);
InventoryInterface.registerInventory(inv);
Create an InventoryRunnable:
Code (Text):
InventoryRunnable r = new InventoryRunnable()
{
    @Override
    public void run(InventoryClickEvent event)
    {
            event.getWhoClicked().sendMessage("this is wood");
                event.getWhoClicked().closeInventory();
    }
};
Add Items to the Inventory:
Code (Text):
inv.addActionItem(new ItemStack(Material.WOOD), r);
Show the Inventory:
Code (Text):
inv.show(player)

3. Source
https://github.com/patroclos/iil


These are the absolute basics, but I will put up a more in depth documentation soon.
If you have any suggestions/ideas/problems feel free to leave a comment.
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

InventoryInterface Library is a free Minecraft Java mod. Downloaded 145 times (via Spigot). Download it and open it directly in the game.

Explore more