ModsJava
MenuMan
Java mod listed for Minecraft 1.16. Download on the author's site.
⬇ Download on SpigotWelcome to MenuMan
Implementation
Create a new MenuBuilder object and follow the fluent interface where it takes you.
ClickAction describes a functional interface that accepts MenuClick objects, a native encapsulation of InventoryClickEvent. You'll find that class comes with an easy-to-use (by method reference), static helper method for the simple action of closing a player's inventory. It looks like this in the wild:
Importing
Releases: Just add the following into your `pom.xml`. No additional repository needed!
Snapshots (requires sonatype repository)
GitHub+Jitpack (requires jitpack repository)
As always, you are welcome to use the issue tracker, open a PR or contact me directly.
Thanks, Matt.
Licensing
My favorite license, the GNU LGPLv3.0. You are welcome to link from proprietary code as long as you disclose the linking and provide end users a way to find the source code they are using. Practically, this is as easy as providing said information with your usual packaging--and a quite simple way to get exact details down to the version is simply providing users a copy of your project's pom.xml. Note that I did not use the word "publishing"; the GPL and LGPL are specifically about empowering end users--and ultimately you still determine who those are and what (if anything) to charge them for it.
Implementation
Create a new MenuBuilder object and follow the fluent interface where it takes you.
ClickAction describes a functional interface that accepts MenuClick objects, a native encapsulation of InventoryClickEvent. You'll find that class comes with an easy-to-use (by method reference), static helper method for the simple action of closing a player's inventory. It looks like this in the wild:
Code (Java):
import
com.github.ms5984.lib.menuman.Menu
;
import org.bukkit.plugin.java.JavaPlugin ;
class MyMenuClass {
public MyMenuClass (JavaPlugin plugin ) {
Menu menu = new MenuBuilder (rows, title )
. addElement ( new ItemStack (Material. DIRT ) )
. setText ( "I've got a jar of dirt!" )
. setLore ( "I've got a jar of dirt!" )
. setAction (ClickAction ::close ) // Right here, it's a beaut.
. assignToSlots ( 0, 2 ). create (plugin ) ;
}
}
import org.bukkit.plugin.java.JavaPlugin ;
class MyMenuClass {
public MyMenuClass (JavaPlugin plugin ) {
Menu menu = new MenuBuilder (rows, title )
. addElement ( new ItemStack (Material. DIRT ) )
. setText ( "I've got a jar of dirt!" )
. setLore ( "I've got a jar of dirt!" )
. setAction (ClickAction ::close ) // Right here, it's a beaut.
. assignToSlots ( 0, 2 ). create (plugin ) ;
}
}
Releases: Just add the following into your `pom.xml`. No additional repository needed!
Code (XML):
<!-- For Maven Central releases -->
<dependencies>
<dependency>
<groupId>com.github.ms5984.lib </groupId>
<artifactId>menu-man </artifactId>
<version>1.0.3 </version>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>com.github.ms5984.lib </groupId>
<artifactId>menu-man </artifactId>
<version>1.0.3 </version>
</dependency>
</dependencies>
Code (XML):
<project>
<!-- For Sonatype Nexus snapshots (primary development here) -->
<repositories>
<repository>
<id>sonatype-snapshots </id>
<url>https://oss.sonatype.org/content/repositories/snapshots/ </url>
<snapshots>
<enabled>true </enabled>
<!-- Optional: configure a custom artifact timeout -->
<updatePolicy>interval:5 </updatePolicy>
<!-- re-downloads artifacts over five minutes old -->
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ms5984.lib </groupId>
<artifactId>menu-man </artifactId>
<version>1.1.0-SNAPSHOT </version>
</dependency>
</dependencies>
</project>
<!-- For Sonatype Nexus snapshots (primary development here) -->
<repositories>
<repository>
<id>sonatype-snapshots </id>
<url>https://oss.sonatype.org/content/repositories/snapshots/ </url>
<snapshots>
<enabled>true </enabled>
<!-- Optional: configure a custom artifact timeout -->
<updatePolicy>interval:5 </updatePolicy>
<!-- re-downloads artifacts over five minutes old -->
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ms5984.lib </groupId>
<artifactId>menu-man </artifactId>
<version>1.1.0-SNAPSHOT </version>
</dependency>
</dependencies>
</project>
Code (XML):
<project>
<!-- For Jitpack pre-release, custom commit builds -->
<repositories>
<repository>
<id>jitpack.io </id>
<url>https://jitpack.io/ </url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ms5984 </groupId>
<artifactId>MenuMan </artifactId>
<version>7b2da4f </version>
</dependency>
</dependencies>
</project>
<!-- For Jitpack pre-release, custom commit builds -->
<repositories>
<repository>
<id>jitpack.io </id>
<url>https://jitpack.io/ </url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.ms5984 </groupId>
<artifactId>MenuMan </artifactId>
<version>7b2da4f </version>
</dependency>
</dependencies>
</project>
Thanks, Matt.
Licensing
My favorite license, the GNU LGPLv3.0. You are welcome to link from proprietary code as long as you disclose the linking and provide end users a way to find the source code they are using. Practically, this is as easy as providing said information with your usual packaging--and a quite simple way to get exact details down to the version is simply providing users a copy of your project's pom.xml. Note that I did not use the word "publishing"; the GPL and LGPL are specifically about empowering end users--and ultimately you still determine who those are and what (if anything) to charge them for it.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.16
- 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.
MenuMan is a free Minecraft Java mod. Compatible with Minecraft 1.16. Downloaded 227 times (via Spigot). Download it and open it directly in the game.