Home›Java›Mods›InventoryS | Easy InventoryGUI API
InventoryS | Easy InventoryGUI API
ModsJava

InventoryS | Easy InventoryGUI API

Java mod listed for Minecraft 1.7–1.12. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
InventoryS - Simple Inventory API

InventoryS is an easy-to-use System to create simple Menus for Minecraft Gamemodes. It has an special Item-Event Bind System to trigger events.

Bitbucket Repo: https://bitbucket.org/L3the/inventorys

How to use?


Creating an Inventory

Creating an Inventory is very easy. Just follow the given example. You need to create an Instance of Inventory (Note: Not the Inventory of Bukkit, these classes have the same name!). Create now as many SlotItems as you need, and add them by addSlotItem to the Inventory. You also can dynamically change the Contents, which allows you to create many different styles!

Code (Text):
//Creates an Simple Inventory
Inventory inv = new Inventory("Testinv",3);
//Creates a SlotItem with the given information.
SlotItem item = new SlotItem("A Item","This is a description.",0,Material.NETHER_STAR);
//Adds the item on position 11 to the Inventory.
inv.addSlotItem(11, item);
//Registers the Inventory to the Listener.
InventoryS.registerInventory(yourplugininstance, inv);
Create a HotbarItem

A HotbarItem can be created like an SlotItem. But, it has to be registered too by using InventoryS.registerHotbarItem(...);

Code (Text):
//Create the HotbarItem.
HotbarItem hbi = new HotbarItem("A MenuItem.","It calls a Menu.",0,Material.FIREWORK);
//Register it.
InventoryS.registerHotbarItem(yourplugininstance, hbi);
Mount action to your HotbarItem

The HotbarItem works like the SlotItem, but it will be only used on the PlayerInteractEvent. So you can define in the head, which Action you want to accept, for triggering your HotbarItem.

Code (Text):
//Create the HotbarItem.
HotbarItem hbi = new HotbarItem("A MenuItem.","It calls a Menu.",0,Material.FIREWORK);
//You can set Actions as params, to define, on which Action, this HotbarItem should get triggered.
//If you insert it like in this example, the onHotbarItemUsed is always triggered, when you click in the air.
hbi.setOnClick(new HotbarRunnable(Action.RIGHT_CLICK_AIR,Action.LEFT_CLICK_AIR){

    @Override
    public void onHotbarItemUsed(PlayerInteractEvent e) {
        //Use whatever code you want. We just want to open an inventory here.
        InventoryS.openInventory(e.getPlayer(), "Hauptmemü");
    }
});

YesNoDialogue

A YesNoDialgoue supports 2 Options, Yes and No. The No Option is by default closing the Window, but can also have a Runnable included.
For more infos, see YesNoDialogue (example coming soon.)

Plugin details

Read from the plugin's own plugin.yml.

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.

InventoryS | Easy InventoryGUI API is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 260 times (via Spigot). Download it and open it directly in the game.

Explore more