ModsJava
Command Builder
Java mod listed for Minecraft 1.16. Download on the author's site.
⬇ Download on SpigotCommand builder is a framework for constructing Bukkit commands. At its core, it allows you to write the essence of your command without having to worry about parsing arguments and plumbing things together. Here's a quick example that creates a calculator command for adding or subtracting two numbers:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable ( ) {
new CommandBuilder ( )
. infer ( this )
. build ( new ReflectionCommandCallback ( this ), getCommand ( "my-command" ) ) ;
}
@ExecuteCommand
private void execute (CommandContext ctx,
@StringSetArgument. Arg ( { "add", "sub" } ) String operation,
int a,
int b ) {
int result ;
if (operation. equals ( "add" ) ) {
result = a + b ;
} else {
result = a - b ;
}
ctx. getSender ( ). sendMessage ( "The result is: " + result ) ;
}
}
Command builder also lets you define your own types of arguments and has other powerful features to make creating commands easy. Feel free to contact LlewVallis#5734 on Discord if there is any thing I can help with.
See the project's GitHub page for more information and installation instructions.
Code (Java):
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable ( ) {
new CommandBuilder ( )
. infer ( this )
. build ( new ReflectionCommandCallback ( this ), getCommand ( "my-command" ) ) ;
}
@ExecuteCommand
private void execute (CommandContext ctx,
@StringSetArgument. Arg ( { "add", "sub" } ) String operation,
int a,
int b ) {
int result ;
if (operation. equals ( "add" ) ) {
result = a + b ;
} else {
result = a - b ;
}
ctx. getSender ( ). sendMessage ( "The result is: " + result ) ;
}
}
See the project's GitHub page for more information and installation instructions.
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.
Command Builder is a free Minecraft Java mod. Compatible with Minecraft 1.16. Downloaded 164 times (via Spigot). Download it and open it directly in the game.