java.lang.Object
com.realtime.crossfire.jxclient.commands.Commands

public class Commands extends Object
Parses and executes client-side commands.
  • Constructor Details

    • Commands

      public Commands()
  • Method Details

    • addCommand

      public void addCommand(@NotNull @NotNull Command command)
      Adds an executable Command.
      Parameters:
      command - the command to add
    • getCommands

      @NotNull public @NotNull Collection<String> getCommands()
      Returns all defined commands.
      Returns:
      the commands in alphabetical order
    • findCommand

      @Nullable public @Nullable Command findCommand(@NotNull @NotNull String commandName)
      Returns a Command by name.
      Parameters:
      commandName - the command name to search
      Returns:
      the command or null if commandName is undefined