@CommandArgument
  public void addroles(
      @OptionArgument("username") String username,
      @OptionArgument("roles") String roles) {

    User user = users.get(username);

    if (user != null) {
      user.roles.addAll(Arrays.asList(roles.split(",")));
    } else {
      System.err.println(String.format("User '%s' does not exist", username));
    }

  }
@ CommandArgument public void addroles ( @ OptionArgument ( "username" ) String username , @ OptionArgument ( "roles" ) String roles ) { User user = users . get ( username ) ; if ( user != null ) { user . roles . addAll ( Arrays . asList ( roles . split ( "," ) ) ) ; } else { System . err . println ( String . format ( "User '%s' does not exist" , username ) ) ; } }
Add roles for a user.
@param username The username of the user for whom to add roles.
@param roles A comma-separated list of the roles to add.