ModsJava
MenuAPI
Java mod listed for Minecraft 1.8–1.12. Downloads from the MC Java Mods app on Android.
⬇ Download on Spigot Into:
This is a super cool API inspired by InventiveTalents menu API but this one is so easy a little kid could use it. It also will stay way more updated than hers
Hot to use it:
First off add the resource into your working space. The first thing we need to do in the plugin is create a new variable MenuManager, and register it in the on enable.
You should never create more than one MenuManager otherwise you may run into confusing errors.
Now lets create the inventory.
So the first arg, the string specifies the name of the inventory. The second arg, an integer specifies the rows to use. You can replace this one with an InventoryType however it is probably easier not to. The last thing refers to the MenuManager.
Now we want to add an item.
The first arg in setItem is the slot we set it in. The second is an ItemStack in this instance just an apple. The third and last arg is a new Item class which is an interface with a click event that must be overridden. Inside of that is where you do whatever you want to happen when this item and just this one is clicked. Do be careful as of this version it is based on the itemstack not the slot it is in.
Now that we've added an item lets just remove it for demonstrations.
Yep, it's that simple. All you have to do is pass in the item to remove. Maybe you want to remove an item when one is clicked I don't know.
Now how can we show a player our kewl creation? Here's how!
Yep, just show the menu to a player. Super easy!
Give me a spare dollar to keep me making great plugins!
This is a super cool API inspired by InventiveTalents menu API but this one is so easy a little kid could use it. It also will stay way more updated than hers
Hot to use it:
First off add the resource into your working space. The first thing we need to do in the plugin is create a new variable MenuManager, and register it in the on enable.
Code (Text):
MenuManager manager;
@Override
public void onEnable() {
manager = new MenuManager(this);
}
@Override
public void onEnable() {
manager = new MenuManager(this);
}
Now lets create the inventory.
Code (Text):
Menu menu = new Menu("This is a test", 1, manager);
Now we want to add an item.
Code (Text):
menu.setItem(3, new ItemStack(Material.APPLE), new Item() {
@Override
public void clickEvent(InventoryClickEvent event) {
event.setCancelled(true);
event.getWhoClicked().sendMessage("Nonono");
}
});
@Override
public void clickEvent(InventoryClickEvent event) {
event.setCancelled(true);
event.getWhoClicked().sendMessage("Nonono");
}
});
Now that we've added an item lets just remove it for demonstrations.
Code (Text):
menu.removeItem(new ItemStack(Material.APPLE));
Now how can we show a player our kewl creation? Here's how!
Code (Text):
menu.show(player);
Give me a spare dollar to keep me making great plugins!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- 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.
MenuAPI is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11 and newer. Downloaded 252 times (via Spigot). Download it and open it directly in the game.