public void deleteFiles() throws IOException {
    File[] files = getDirectory().listFiles();
    for(int i = 0; i < files.length; i++) {
        if (files[i].isFile()) {
            if (files[i].getName().contains("client") && files[i].getName().endsWith(".zip")) {
                files[i].delete();
            }
        }
    }
    xServer.loadServers();
    for(int i = 0; i < xSettingsOfTheme.Servers.length; ++i) {
        xServer server = xServer.getServers()[i];
        if (server.getFolder().isEmpty()){
            if (!one){
                String md = getDirectory() + File.separator;
                File mdf = new File(md);
                String[] mdfs = mdf.list(new FilenameFilter() {
                    @Override
                    public boolean accept(File mdf, String name) {
                        return name.contains("mods");
                    }
                });
                for(int m = 0; m < mdfs.length; ++m) {
                    deleteDir(new File(getDirectory() + File.separator + mdfs[i]));
                }
                deleteDir(new File(getDirectory() + File.separator + "bin"));
                deleteDir(new File(getDirectory() + File.separator + "config"));
                one = true;
            }
        } else {
            deleteDir(new File(getDirectory() + File.separator + server.getFolder()));
        }
    }
  }