This API allows you to easily create Inventory Menus and Chat Menus.
Examples
Inventory
Simple inventory with one item and the title "My custom inventory"
Code (Java):
new InventoryMenuBuilder().withSize(9).withTitle("My custom inventory").withItem(4, new ItemStack(Material.STONE)).show(player);
Item with a custom click listener
Code (Java):
new InventoryMenuBuilder().withSize(9).withTitle("My custom inventory").withItem(4, new ItemStack(Material.STONE), new ItemListener() {
@Override
public void onInteract(Player player, ClickType action, ItemStack item) {
player.sendMessage("You left-clicked me!");
}
}, ClickType.LEFT).show(player);
Chat
Simple text-only menu
Code (Java):
new ChatMenuBuilder().withLine("This is the first line", "This is the second line", "...").show(player);
Text with a custom click listener
Code (Java):
new ChatMenuBuilder().withLine(new LineBuilder().append(new ChatListener() {
@Override
public void onClick(Player player) {
player.sendMessage("You clicked me!");
}
}, new TextComponent("Click me!"))).show(player);
If you click it, it will call the code of the listener:
![]()
Custom components - Checkbox
Code (Java):
new ChatMenuBuilder().withLine(new LineBuilder().append(new MenuComponentCheckbox().onChange(new ValueListener<Boolean>() {
@Override
public void onChange(Player player, Boolean oldValue, Boolean newValue) {
player.sendMessage("You changed the value! " + oldValue + " -> " + newValue);
}
}))).show(player);
Every time you click it, it will call the value change and update the displayed checkbox
![]()
Maven
Code (Text):<repositories>
<repository>
<id>inventive-repo</id>
<url>https://repo.inventivetalent.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.inventivetalent</groupId>
<artifactId>menubuilder</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
Links
Please leave a rating if you like this resource.
Donations to support me or this resource are also very much appreciated.

[API] MenuBuilder 1.1.0-SNAPSHOT
Easily create Inventory and Chat Menus
Recent Updates
- 1.11 support Feb 24, 2017
- Minor change Jan 24, 2016
- Listener unregister methods Jan 6, 2016