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 "
new InventoryMenuBuilder ( ) . withSize ( 9 ) . withTitle ( "My custom inventory" ) . withItem ( 4 , new ItemStack ( Material. STONE ) ) . show ( player ) ;
Item with a custom click listener
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
new ChatMenuBuilder ( ) . withLine ( "This is the first line" , "This is the second line" , "..." ) . show ( player ) ;
Text with a custom click listener
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
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
Links
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>
<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.
Donations to support me or this resource are also very much appreciated.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
[API] MenuBuilder is a free Minecraft Java mod. Downloaded 7,616 times (via Spigot). Download it and open it directly in the game.