public void StartMinecraft() {
        try {
            String memory = xTheme.readMemory();
            if (memory == null || memory.isEmpty()) memory = Integer.toString(512);
            ArrayList<String> params = new ArrayList<String>();
            xUtils utils = new xUtils();
            String nativespath;
            File librarypath;
            String workdir;
            String assetsdir;
            String jarpath;
            if (this.folder.isEmpty()) {
                nativespath = utils.getDirectory() + File.separator + "bin" + File.separator + "natives";
                librarypath = new File(utils.getDirectory() + File.separator + "libraries");
                workdir = utils.getDirectory().toString();
                jarpath = utils.getDirectory() + File.separator + "bin" + File.separator + this.jarfile;
                assetsdir = utils.getDirectory() + File.separator + "assets";
            } else {
                nativespath = utils.getDirectory() + File.separator + this.folder + File.separator + "bin" + File.separator + "natives";
                librarypath = new File(utils.getDirectory() + File.separator + this.folder + File.separator + "libraries");
                workdir = utils.getDirectory() + File.separator + this.folder;
                jarpath = utils.getDirectory() + File.separator + this.folder + File.separator + "bin" + File.separator + this.jarfile;
                assetsdir = utils.getDirectory() + File.separator + this.folder + File.separator + "assets";
            }
            if (utils.getPlatform().toString().equals("windows")) params.add("javaw");
            else params.add("java");
            params.add("-Xms" + Integer.parseInt(memory)/2 + "m");
            params.add("-Xmx" + memory + "m");
            File assetsDirectory = new File(assetsdir);
            if (utils.getPlatform().toString().equals("macos")) {
                params.add("-Xdock:icon=" + new File(assetsDirectory, "icons/minecraft.icns").getAbsolutePath());
                params.add("-Xdock:name=" + xSettings.gameName);
            }
            String img = new File(xLoader.class.getResource("/images/favicon.png").toString()).getAbsolutePath();
            System.out.println(img);
            params.add("-Djava.library.path=" + nativespath);
            params.add("-classpath");
            String libraries = getLibraries(librarypath);
            if (!libraries.isEmpty()) {
                libraries = libraries + ";" + jarpath;
            } else {
                libraries = jarpath;
            }
            params.add("\"" + libraries + "\"");
            params.add("net.minecraft.client.main.Main");
            params.add("--username");
            params.add(this.userName);
            params.add("--session");
            params.add(this.sessionId);
            params.add("--version");
            params.add(this.version);
            params.add("--gameDir");
            params.add(workdir);
            params.add("--assetsDir");
            params.add(assetsdir);
            if (!this.server.equals("0")) {
                params.add("--server");
                params.add(this.server);
                params.add("--port");
                params.add(this.port);
            }
            
            ProcessBuilder pb = new ProcessBuilder(params);
            process = pb.start();
            if (process == null) throw new Exception("Client can't be started!");
            exit();
        } catch (Exception var6) {
            System.out.println(var6.getMessage());
        }
    }