public static Version resolveVersion ( MinecraftDirectory minecraftDir , String version ) throws IOException { Objects . requireNonNull ( minecraftDir ) ; Objects . requireNonNull ( version ) ; if ( doesVersionExist ( minecraftDir , version ) ) { try { return getVersionParser ( ) . parseVersion ( resolveVersionHierarchy ( version , minecraftDir ) , PlatformDescription . current ( ) ) ; } catch ( JSONException e ) { throw new IOException ( "Couldn't parse version json: " + version , e ) ; } } else { return null ; } }
Resolves the version .