MooCommands

MooCommands is a library which lets you create Command objects which represent text commands. Each Command object contains a piece of code which will run when the command is executed/fired for a given set of parameters.

MooCommands would could be used effectively in programs like IRC clients.

MooConsole depends on MooCommands.

Writing a command object

  1. Extend the abstract com.moomoohk.MooCommands.Command class. This will inherit the following abstract methods:
  2. String getCommand(): Returns the String that matches this command. This method should only contain one line, a return statement. I.e. return "/help"
  3. String getHelpMessage(): Returns a String containing a message describing what this command does
  4. String getUsage(): Returns a String containing helpful usage information. This includes syntax and any parameters
  5. int getMaxParams(): Returns an int representing the maximum amount of parameters this command takes
  6. int getMinParams(): Returns an int representing the mainimum amount of parameters this command takes

I really need to finish this page

Links