public void startMinecraft(String player, String server, String mppass, int port, String skinServer, boolean fullscreen) {
        //  Set up Minecraft instance
        MCraftApplet applet = new MCraftApplet();
        MinecraftCanvas canvas = new MinecraftCanvas();
        minecraft = new Minecraft(canvas, applet, fullscreen, false);

        if (player != null || server != null || mppass != null) {
            minecraft.session = new SessionData(player, "noidea");
            minecraft.session.mppass = mppass;
            minecraft.session.haspaid = true;
        }
        minecraft.server = server;
        minecraft.port = port;
        if (skinServer != null) {
            minecraft.skinServer = skinServer;
        }

        // finish layout and center the frame
        canvas.setFocusable(true);
        canvas.setSize(getSize());
        add(canvas, BorderLayout.CENTER);
        pack();
        setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - getWidth()) / 2,
                (Toolkit.getDefaultToolkit().getScreenSize().height - getHeight()) / 2);

        // at least, show the game window! This starts the render loop.
        setVisible(true);

        // Idle the main thread until MC has shut down
        while (true) {
            if (!minecraft.isRunning) {
                minecraft.shutdown();
                System.exit(0);
            }
            try {
                Thread.sleep(10);
            } catch (InterruptedException ex) {
            }
        }
    }