Пример #1
0
 /**
  * Invoke the command if the name matches the one to be triggered
  *
  * @param argLength The amount of arguments in the 'args' param
  * @param args The arguments the command was invoked with. This can be empty if none were
  *     provided. Keep in mind this does NOT include the Command Name. Args are separated by spaces
  * @param command The full command message
  */
 @Override
 public void invokeCommand(int argLength, String[] args, String command) {
   List<String> strList = new ArrayList<>();
   for (AbstractCommand cmd : CommandBus.commands) {
     strList.add(cmd.getCommandName());
   }
   for (FuzzyCommand cmd : CommandBus.parsers) {
     if (cmd instanceof IHelpable) strList.add(((IHelpable) cmd).getCommandName());
   }
   String join = String.join(", ", strList);
   Toast.log().info("Commands List: " + join);
 }
 /**
  * Invoke the command if the name matches the one to be triggered
  *
  * @param argLength The amount of arguments in the 'args' param
  * @param args The arguments the command was invoked with. This can be empty if none were
  *     provided. Keep in mind this does NOT include the Command Name. Args are separated by spaces
  * @param command The full command message
  */
 @Override
 public void invokeCommand(int argLength, String[] args, String command) {
   Toast.log().error("Goodbye cruel world!");
   CrashHandler.handle(new Exception("Invoked Debug Crash"));
 }