public void run()
    {
        running = true;
        
        try
        {
            if (!main.getConfig().getBoolean("force-update"))
            {
                VersionChecker.checkVersion(main.getApi());
                
                while (askUpdate)
                {
                    // Wait user.
                    Thread.sleep(10L);
                }
            }
            else
            {
                doUpdate = true;
            }
            
            UpdaterWorker.determinePackages(main.getApi());
            
            if (doUpdate)
            {
                UpdaterWorker.update(main.getApi());
            }
            
            percentage = 90;
        }
        catch (final Exception e)
        {
            e.printStackTrace();
        }
        
        running = false;
    }