Class RootCommand

java.lang.Object
com.github.theword.queqiao.tool.command.SubCommand
com.github.theword.queqiao.tool.command.RootCommand

public class RootCommand extends SubCommand
根命令抽象类

所有平台的根命令实现应继承此类

在各平台的实现中注册所有一级子命令

Since:
0.5.0
  • Constructor Details

    • RootCommand

      public RootCommand()
      构造根命令
  • Method Details

    • getName

      public String getName()
      获取命令名称
      Specified by:
      getName in class SubCommand
      Returns:
      命令名称(queqiao)
    • getDescription

      public String getDescription()
      获取命令描述
      Specified by:
      getDescription in class SubCommand
      Returns:
      命令描述
    • onExecute

      protected void onExecute(Object commandReturner, List<String> args)
      执行命令
      Specified by:
      onExecute in class SubCommand
      Parameters:
      commandReturner - 命令执行者
      args - 命令参数