Class Command

java.lang.Object
baritone.api.command.Command
All Implemented Interfaces:
ICommand, Helper

public abstract class Command extends Object implements ICommand
A default implementation of ICommand which provides easy access to the command's bound IBaritone instance, IPlayerContext and an easy way to provide multiple valid command execution names through the default constructor.

So basically, you should use it because it provides a small amount of boilerplate, but you're not forced to use it.

Author:
LoganDark
See Also:
  • Field Details

  • Constructor Details

    • Command

      protected Command(IBaritone baritone, String... names)
      Creates a new Baritone control command.
      Parameters:
      names - The names of this command. This is what you put after the command prefix.
  • Method Details

    • getNames

      public final List<String> getNames()
      Specified by:
      getNames in interface ICommand
      Returns:
      A list of the names that can be accepted to have arguments passed to this command