Class HelpCmd

java.lang.Object
com.j3d.engine.interact.cmd.base.Command
com.j3d.engine.interact.cmd.commands.HelpCmd

public class HelpCmd extends Command
A command that provides help information about other commands.

When invoked without arguments, it lists all available top-level commands. When invoked with a command name, it displays the description, aliases, and usages for that specific command.

It leverages InlineHTML to format the output for better readability in the UI.

Aliases: h, use, usage

Author:
Lehlogonolo Poole
See Also:
  • Constructor Details

    • HelpCmd

      public HelpCmd()
  • Method Details

    • run

      public void run(Invoker invoker, SafeJLabel logLabel, String aliasUsed, Object[] args, ArrayList<TaggedArgValue<?>> taggedArgs)
      Description copied from class: Command
      The method to be overridden by subclasses to implement command functionality.
      Overrides:
      run in class Command
      Parameters:
      invoker - The invoker of this command
      logLabel - The JLabel to display log messages.
      aliasUsed - The alias of the command that was used to invoke it.
      args - The arguments passed to the command.
      taggedArgs - Tagged arguments passed to the command.
    • getCommands

      private static ArrayList<Command> getCommands(AtomicInteger maxCmd, int max, StringBuilder stringBuilder)