@Override
    public void onLoadStateChange(LatestVersionListEvent event)
    {
        switch (event.getSource().getLoadState()) {
            case FAILED:
                status = Status.FAILED;
                break;
            case IDLE:
                status = Status.IDLE;
                break;
            case LOADED:
                status = Status.FOUND;
                boolean usingSnapshots = false;
                for (int i = 0; i < profile.allowedReleaseTypes.length; i++)
                {
                    if (profile.allowedReleaseTypes[i].equals("snapshot"))
                    {
                        usingSnapshots = true;
                    }
                }
                if (usingSnapshots)
                {
                    version = MinecraftVersion.fromLatestSnapshot();
                }
                else
                {
                    version = MinecraftVersion.fromLatestRelease();
                }
                if (version == null)
                {
                    status = Status.FAILED;
                }
                else
                {
                    versionName = version.getName();
                }
                break;
            case LOADING:
                status = Status.IDLE;
                break;
        }
        for (IProfileUpdateListener listener : listeners)
        {
            listener.onProfileUpdate(new ProfileUpdateEvent(this));
        }
    }