Package com.sk89q.skmcl.application

Examples of com.sk89q.skmcl.application.Version


        this.version = version;
    }

    @Override
    public Version getLatestStable() throws IOException, InterruptedException {
        Version release = getReleaseList().find(
                getReleaseList().getLatest().getRelease());
        if (release != null) {
            return release;
        } else {
            throw new IOException("Failed to get latest stable release");
View Full Code Here


    public List<Version> getInstalled() {
        List<Version> versions = new ArrayList<Version>();
        File dir = new File(profile.getContentDir(), "versions");
        if (dir.exists()) {
            for (File d : dir.listFiles(new VersionFoldersFilter())) {
                versions.add(new Version(d.getName()));
            }
        }
        return versions;
    }
View Full Code Here

    }

    @Override
    public MinecraftInstall getInstance(Environment environment, boolean offline)
            throws ResolutionException, OnlineRequiredException {
        Version current = getVersion();
        if (current == null) {
            throw new NullPointerException("No version is set for this application");
        }
        return new MinecraftInstall(getProfile(),
                current.resolve(this, offline), environment);
    }
View Full Code Here

     * Get the URL of the JSON file that tells information about the desired version.
     *
     * @return the URL
     */
    private URL getManifestUrl() {
        Version version = instance.getVersion();

        return url(String.format(
                VERSION_MANIFEST_URL,
                version.getId(), version.getId()));
    }
View Full Code Here

TOP

Related Classes of com.sk89q.skmcl.application.Version

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.