@Override public RetVal execute(ArrayList<String> arg, String pName) { Log.debug("CommandEdit.execute"); RetVal r = new RetVal(); arg.remove(0); // Remove 'edit' from the arguments list. if (arg.isEmpty()) { Log.debug("arg is empty."); r.addAll(getFullHelp()); return r; } switch (arg.get(0)) { case "help": r.addAll(getFullHelp()); r.tru(); return r; case "entrance": arg.remove(0); return subEntrance(arg, pName); default: r.addAll(getFullHelp()); r.Err("Couldn't find command '" + arg.get(0) + "'!"); return r; } }