public static void checkVersion(LauncherAPI api) throws Exception
    {
        boolean update = false;
        
        final List<Map<String, Object>> versions = api.getConfig().getMapList(
                "updater.versions");
        
        for (final Map<String, Object> version : versions)
        {
            if (!update)
            {
                final File file = new File(api.getMinecraftDirectory(),
                        (String) version.get("file"));
                final String lastVersion = getLastVersion(api,
                        (String) version.get("source"));
                
                if (lastVersion != null)
                {
                    if (!file.exists())
                    {
                        update = true;
                        api.getUpdater().setAskUpdate(false);
                        api.getUpdater().setDoUpdate(true);
                    }
                    else
                    {
                        final String current = readVersionFile(api, file);
                        final Version v1 = Version.parseString(current);
                        final Version v2 = Version.parseString(lastVersion);
                        
                        if (v2.compareTo(v1) > 0)
                        {
                            update = true;
                            boolean force = (Boolean) version.get("force");
                            if (!force)
                            {
                                force = api.getConfig().getBoolean(
                                        "updater.askUpdateIfAvailable", true);
                            }
                            
                            if (!force)
                            {
                                api.getUpdater().setAskUpdate(true);
                            }
                            api.getUpdater().setDoUpdate(true);
                        }
                    }
                }
                
                if (update)
                {
                    updateVersionFile(file, lastVersion);
                }
            }
        }
    }