Home›Java›Mods›[1.11]CMDHelper
[1.11]CMDHelper
ModsJava

[1.11]CMDHelper

Java mod listed for Minecraft 1.11. Download on the author's site.

⬇ Download on Spigot
Did you ever get annoyed of Spigot/Bukkit using Player names as every tab-auto-complete option?
Or are you tired of having to route your commands on your own using lots of spaghetti code and if statements?
If you are a developer, this is the Framework for you...
This Plugin adds an easy option to add complex auto-complete mechanisms.
This Plugin just got a brand new update!
It should be pretty much self-explanatory now!

Example Snippet:
Code (Text):

public class YourPlugin extends JavaPlugin{
  @Override
  public void onEnable(){
     //create your command
     PluginCommand testCommand = getCommand("testCommand");
     //You can let my plugin route the command for you... "Setblock" is always being printed when 3 coordinate arguments are followed by a block argument
     testCommand.setExecutor(new CommandRouter().addRoute("<x> <y> <z> <block>", (s, c, a, args) -> {
       System.out.println("Setblock");
       return true;
      //Same stuff but with other parameters
     }).addRoute("<block> <material>", (s, c, a, args) -> {
       System.out.println("Other Stuff");
       return true;
     }));
      //This registers your command to be auto-tab-completed
     registerCommandSyntax(testCommand, "[<x> <y> <z> <block>]|[<block> <material>]|[<block> <x> <y>] [<x>]", new PermissionMask("<block> <material> <x>", "permission-coolness"));
    //You can add as many Permission masks as you like.
    //Permission masks prevents auto-completes, when a user doesn't have sufficient permissions
  }
}
 
Current Features:
But I want to add my own custom Identifier, the vanilla identifiers are not enough!
There's a solution for you! You can create your own custom identifiers like this:

Code (Text):

CommandArgument.registerArgument("c", new CommandArgument(){
   @Override
   public List<String> getSuggestions(String arg, CommandSender sender) {
     //Your Code here
     return new ArrayList<>();
   }

   @Override
   public boolean matches(String arg, CommandSender sender) {
     //Your Code here
     return false;
   }
});
 
You can now use '<c>' inside your syntax!

If you encounter any bugs or exceptions with this Plugin, please let me know :)
Have Fun!
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

[1.11]CMDHelper is a free Minecraft Java mod. Compatible with Minecraft 1.11. Downloaded 568 times (via Spigot). Download it and open it directly in the game.

Explore more