public String getName ( boolean forcedUpdate ) { String name = get ( ) . getName ( ) ; if ( ( name == null || forcedUpdate ) && api . getRiotApi ( ) != null ) { try { name = api . getRiotApi ( ) . getName ( getUserId ( ) ) ; setName ( name ) ; } catch ( final IOException e ) { e . printStackTrace ( ) ; } } return name ; }
Gets the name of this friend . If the name was null then we try to fetch the name with your Riot API Key if provided . Enable forcedUpdate to always fetch the latest name of this Friend even when the name is not null .