Sueta
IN

InventoryGUI

0.0.5

inventory item buttons (teleport, commands, bungee teleport, custom..)

·Plugin

Easy to use inventory gui.
Make your own item GUI and add buttons to teleport a player, execute a command or run your custom programmed behaviour.

See Wiki for detailed information.

Inventory Gui Demo.png

Define GUIs for multiplayer lobby with the plugin ItemSet. The dialog is defined in a single config file (You need to add both plugins to your server).

<itemset>
<item-definition>
    <item-container id="inventoryGui" name="Inventory" item-factory="de.tantalos.inventorygui.InventoryGuiFactory">
        <arg>pattern=PPXOXXPPP</arg>
        <arg>material=COMPASS</arg>
        <item-slot item="button1" position="0" />
        <item-slot item="button2" position="0" />
        <item-slot item="button3" position="0" />
    </item-container>

    <item id="button1" name="Button1" item-factory="de.tantalos.inventorygui.ButtonGuiFactory">
        <arg>type=teleport</arg>
        <arg>material=BLAZE_ROD</arg>
        <arg>world=world</arg>
        <arg>x=0</arg>
        <arg>y=80</arg>
        <arg>z=0</arg>
    </item>

    <item id="button2" name="Button2" item-factory="de.tantalos.inventorygui.ButtonGuiFactory">
        <arg>type=bungeeTeleport</arg>
        <arg>material=IRON_SWORD</arg>
        <arg>server=spawn</arg>
    </item>

    <item id="button3" name="Button3" item-factory="de.tantalos.inventorygui.ButtonGuiFactory">
        <arg>type=teleport</arg>
        <arg>material=STICK</arg>
        <arg>world=world</arg>
        <arg>x=-5</arg>
        <arg>y=80</arg>
        <arg>z=-5</arg>
    </item>
</itemset>
</item-definition>

InventoryGUI as Library:

Create inventory GUI dialog with the gui dialog builder

final DialogBuilder builder = new DialogBuilder(plugin);
builder.setTitle("Any Title");

// add clickable buttons
builder.addButton(button1);
builder.addButton(button2);
...

// build dialog and open for player
DialogManager dialog = builder.build();
dialog.open(player);

OR
// give item which opens dialog when used
GuiItem.guiItem(plugin, item, builder);

Add buttons for teleporting a player, executing a command or programm your own button.

ItemStack look = new ItemStack(COMPASS);
Button button1 = new TeleportButton(location, look);
Button button2 = new CommandButton("a minecraft command", plugin, player, look);
Button button3 = new BungeeTeleportButton(plugin, "bungee server name", look);
Button button4 = new Button(look) {
    @Override
    public void onButtonClicked(HumanEntity player) {
        // do your stuff when clicked
        ..
    }
}

If you find a bug or have an idea to improve InventoryGUI, use the issue tracker and create a ticket.

Upcoming features:
- multi dialog pages

Similar projects

Plugin →