Commands Library 1.2

With this library you will be able to create commands on a really easy way

  1. MaTaMoR_
    This is basically a Library to make commands, with this you can register commands without putting them on the plugin.yml and many commands for Class.

    Example:

    Code (Java):

    //I'll Create a class where will be the Commands
    //The class must implement the interface 'Commander'
    public class Commands implements Commander {

    //To create a command you have to put the annotation 'CommandHandler' above a method with these parameters : 'CommandSender', 'Command', 'String[]'
    // If the Method doesn't have these parameters the Command won't work even if it have the annotation 'CommandHandler'
    @CommandHandler(command = "example", description = "Example command")
    public void onCommand(CommandSender sender, Command command, String[] args) {
    //Command
    }

    //You can register more and more commands on a single class
    }

    //You can define more things on the annotation 'CommandHandler', like 'usage', 'aliases', 'permission', 'noPermissionMessage' and 'onlyPlayer'

    //Now we have the Class with the commands, so we have to register the Commands

    CommandManager.commands().registerCommands(new Commands());

    //That's all, it's really easy to use.
     
    Since this is a Library you can modify the Source to make it work as you wish.
    Hydra666 likes this.

Recent Updates

  1. Fixed NoPermissionMessage
  2. Added new Options

Recent Reviews

  1. NacH98FM
    NacH98FM
    5/5,
    Version: 1.2
    Would be great have a support for SubCommands, something like assign a command to another command that way the command don't have to be that big having to check for args, etc...