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!
This library makes building GUIs simple as 1, 2, 3. See.
Component.gui()
.title("GUI Title")
.rows(3)
.prepare((g) -> {
// Do that magic
Container container = Component.staticContainer()
.size(4, 1)
.init(c -> {
c.fillElement(Component.element()
.click(info -> {
info.close();
info.getPlayer().sendMessage("§7Hello World!");
})
.item(Items.create(Material.REDSTONE_BLOCK, "§aHello World Message"))
.build());
}).build();
g.setContainer(1, container);
})
.build()
.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>