GUI-API

GUI-API

A modular, component-based GUI framework for Spigot/Paper/Folia plugins.

110 downloads 4 followers

🧩 GUIAPI - The Ultimate Component-Based GUI Framework

Are you tired of writing messy, repetitive, and unmaintainable inventory code for your Bukkit/Spigot/Paper plugins? Say goodbye to manual slot calculations and spaghetti InventoryClickEvent listeners!

GUIAPI is a powerful, modern, and modular UI framework designed specifically for Minecraft developers. Build interactive, dynamic, and responsive inventory GUIs with a clean, declarative approach using reusable components.


✨ Why Choose GUIAPI?

  • πŸš€ Save Hundreds of Hours: Build complex UIs in minutes instead of days.
  • 🧱 Component-Based Architecture: Everything is a component. Build your UI like Lego blocks using buttons, panels, text inputs, and scrollbars.
  • 🎨 Nested Coordinate Systems: Group your components into GuiPanels. Move a whole panel, and all its children move automatically! No more calculating absolute inventory slots.
  • πŸ”„ Live Updating: Built-in async updaters let you create live clocks, real-time status indicators, and animated menus that automatically clean up when the player closes the inventory.
  • πŸ“¦ Flexible Distribution: Use it as a server plugin or shade it directly into your JAR β€” your choice!
  • 🌐 Wide Version Support: Works on Minecraft 1.8 through the latest, including Folia servers.

πŸ”₯ Premium Features

  • πŸ“ Chat Text Input (GuiTextInput & GuiListTextInput): Prompt players to enter text in chat with built-in validation and custom error messages.
  • πŸŽ’ Item Chooser (GuiItemChooser): Let players click any item in their inventory to use as an input for your forms.
  • πŸ“₯ True Editable Slots (GuiEditableSlot): A slot that acts like a real inventory slot. Supports left-click, right-click, shift-click, stacking, swapping, and splitting. You have full control to accept or reject items!
  • πŸ“œ Pagination & Scrolling: Instantly handle massive amounts of data with GuiListPage, GuiScrollPane (vertical), and GuiScrollBar (horizontal) with automatic next/previous buttons.
  • βš™οΈ Configurable Buttons (GuiConfigurableButton): Buttons that automatically generate a sub-GUI allowing players to edit Key-Value pairs right out of the box!
  • 🌈 Modern Formatting: Full support for Hex colors (&#FF0000), Gradients (<gradient:#ff0000>Text<#00ff00>), and Legacy codes.
  • πŸ’Ύ NBT Metadata Injection: Effortlessly pass custom data to your items directly from the rendering engine without messing with raw NBT tags.

πŸ’» Code Speaks for Itself

Look how simple it is to create a fully functioning UI:

// 1. Initialize GUILibs
GUILibs guiLibs = GUILibs.init(this);
guiLibs.register();

// 2. Create a GUI
GUI myGui = guiLibs.createGUI("<gradient:#FFD700>Premium Shop<#50C878>", 3);

// 3. Create a Button
GuiButton button = new GuiButton(myGui, "buy-item", 13);
button.setDisplayItem(guiLibs.getItemBuilder(Material.DIAMOND, 1)
    .setDisplayName("&bBuy Diamond")
    .addLore("&7Price: $100")
    .build());

// 4. Add behavior
button.addListener((id, event) -> {
    event.getWhoClicked().sendMessage("Β§aPurchase successful!");
    return true; // Auto-cancel the click event!
});

// 5. Register and Open
myGui.addComponent(button);
myGui.open(player);

πŸ“¦ Installation

GUIAPI supports two installation methods. Choose what fits your project:

Option A: Plugin Dependency (Recommended)

Install GUIAPI as a plugin on the server and depend on it. Keeps your JAR small.

Add the JitPack repository, then add the dependency:

Maven:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependency>
    <groupId>com.github.downnfalls.guiapi</groupId>
    <artifactId>guiapi-plugin</artifactId>
    <version>VERSION</version>
    <scope>provided</scope>
</dependency>

Gradle (Groovy):

repositories {
    mavenCentral()
    maven { url 'https://jitpack.io/' }
}

dependencies {
    compileOnly 'com.github.downnfalls.guiapi:guiapi-plugin:VERSION'
}

Gradle (Kotlin DSL):

repositories {
    mavenCentral()
    maven("https://jitpack.io/")
}

dependencies {
    compileOnly("com.github.downnfalls.guiapi:guiapi-plugin:VERSION")
}

plugin.yml:

depend: [GUIAPI]

Option B: Shade (Bundle into your JAR)

Bundle GUIAPI inside your plugin. No extra server plugins needed, but you must relocate the package.

Use artifact com.github.downnfalls.guiapi:guiapi-core with compile/implementation scope and configure relocation via Maven Shade Plugin or Gradle Shadow.

See the full README for detailed shading instructions.

Replace VERSION with the latest release tag from JitPack.


πŸ“‹ Requirements

  • Server: Spigot, Paper, Folia, or any Bukkit-compatible fork (1.8.8 β€” Latest)
  • Java: 17+

πŸ“– Examples & More Info

There is no steep learning curve! For full code examples and a detailed guide on how to use every single feature, please check out the README on our GitHub Repository.

Version Minecraft Loader Download

GUIAPI 1.1.0

1.1.0

1.10, 1.10.1, 1.10.2, 1.11, 1.11.1, 1.11.2, 1.12, 1.12.1, 1.12.2, 1.13, 1.13.1, 1.13.2, 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2, 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.8.8, 1.8.9, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 26.1, 26.1.1, 26.1.2
folia, paper, purpur, spigot
Download

GUIAPI 1.0.2

1.0.2

1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.10, 1.21.11, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 26.1, 26.1.1, 26.1.2
paper, purpur, spigot
Download