private void downloadPlugin(String name) {
        URL remotePlugin;
        try{
            remotePlugin = new URL("http", server, serverport, 
                    "/" + name + ".jar");
        } catch (MalformedURLException e) {
            return;
        }
        System.err.println(remotePlugin.toString());

        BufferedInputStream in;
        BufferedOutputStream out;
        try {
            in = new BufferedInputStream(
                    remotePlugin.openStream());
        } catch(IOException ex) {
            return;
        }

        try {
            out = new BufferedOutputStream(
                    new FileOutputStream(directory + name + ".jar"));
        } catch(IOException ex) {
            try{
                in.close();
            } catch(IOException ex1) {
                return;
            }
            return;
        }
        
        /* Buffer for reading in and printing the files */
        byte buffer[] = new byte[4096];

        try {
            /* Read in until end of stream and write to the file */
            int read = in.read(buffer);
            while(read != -1) {
                out.write(buffer, 0, read);
                read = in.read(buffer);
            }

        } catch(IOException ex) {
            return;
        } finally {
            try{
                out.close();
            }catch(IOException ex1) {}

            try{
                in.close();
            }catch(IOException ex1) {}
        }
    }