An advanced GUI solution. Build fast, responsible, animated menus.
Let's imagine almost unlimited GUI possibilities.
Creating a static GUI (Graphical User Interface) can be a tedious and time-consuming task, especially when working with complex environments like Minecraft. That's where the Containr library comes in. Reactive, modular and highly extendable. These are the words that describe Containr well!
- Reusable Components: Create reusable components for items (Element) and containers (Container) to keep even the most complex menu systems maintainable.
- Nested Containers: Embed containers within each other to create flexible and modular menu structures. Each container has its own indexing system based on its size.
- Pagination Support: Support for multi-layer pagination using containers, making it easy to handle large amounts of content.
- High Performance: Optimized system enables extremely fast menu creation and updates.
- Animation Support: Built-in support for implementing animations for single elements, or whole containers.
- Pattern-based Layout Support: Define menu layouts using patterns, allowing menus to be configured directly from config files.
- YAML Serialization: Save and load entire menu structures using Spigot YAML configuration files and allow your users to define their own easily.
This library makes building GUIs simple and quick as 1, 2, 3. See:
GUI gui = Component.gui()
.title("GUI Title")
.rows(3)
.prepare((g) -> {
Container container = Component.staticContainer()
.size(4, 1)
.init(c -> {
c.setElement(2, Component.element()
.click(info -> {
Player player = info.getPlayer();
player.sendMessage("§7Time refreshed!");
info.getGui().update(player);
})
// Compute an item on every render
.item(info -> Items.create(Material.REDSTONE_BLOCK,
"§cTime: " + DateTimeFormatter.ofPattern("HH:mm:ss").format(LocalTime.now()),
"§7Click to refresh the time")
)
.build());
}).build();
g.setContainer(1, container);
})
.build();
gui.open(player);You can add Containr to your build path using Maven or Gradle. ContainrGUI is not a Minecraft plugin! This means that you can use it's code directly in your project by shading it into your build path.
Gradle
Add this project to your build path using Gradle with JitPack as represented below.
repositories {
maven { url = 'https://jitpack.io' }
}dependencies {
implementation 'com.github.ZorTik:ContainrGUI:0.6'
}Maven
You can also use Maven with JitPack as seen below.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories><dependency>
<groupId>com.github.ZorTik</groupId>
<artifactId>ContainrGUI</artifactId>
<version>0.6</version>
</dependency>