creating your first gui - VerduzcoTristan/GUIUtility GitHub Wiki

Installation

You can copy the files directly into your project (4.4KB)

Creating your first GUI

The GUI class is the template for all GUI's. It contains static methods for opening and building inventories.

Here is an example of the class in use:

    public class BlockGUI implements GUI {
    
        public BlockGUI(int size, String title)
        {
            // Not required, but allows for simple implementation
            super(size, title);
            this.entries.add(new HealEntry(Material.GOLDEN_APPLE, 14));
            // Your code here
        }

	    // This will run when your inventory is opened
        @Override
        public void onOpen(InventoryOpenEvent event)
        {
            // Your code here
        }
    
	    //This will run when your inventory is closed
        @Override
        public void onClose(InventoryCloseEvent event)
        {
            // Your code here
        }
    }

And that's it! You made your GUI! Now its time to add your own custom buttons!

⚠️ **GitHub.com Fallback** ⚠️