public void patchDir(String jar)
       {
           if(!xSettings.patchDir) return;
           try
           {
                       String mcver = version;
                       for(int j = 0; j < xSettings.mcversions.length; j++)
                       {
                           String mcverfromsettings = xSettings.mcversions[j].split("::")[0];
                           if (mcverfromsettings.indexOf("x") == -1) {
                               if(mcver.equals(mcverfromsettings))
                               {
                                   xUtils utils = new xUtils();
                                   Field f = classLoader.loadClass(xSettings.mcclass).getDeclaredField(xSettings.mcversions[j].split("::")[1]);
                                   Field.setAccessible(new Field[] { f }, true);
                                   if (folder.isEmpty()){
                                       f.set(null, utils.getDirectory());
                                   } else {
                                       f.set(null, new File(utils.getDirectory() + File.separator + folder));
                                   }
                                   System.out.println("File patched: " + xSettings.mcclass + "::" + xSettings.mcversions[j].split("::")[1]);
                                   return;
                               }
                           } else {
                               if(mcver.substring(0, 3).equals(mcverfromsettings.substring(0, 3)))
                               {
                                   xUtils utils = new xUtils();
                                   Field f = classLoader.loadClass(xSettings.mcclass).getDeclaredField(xSettings.mcversions[j].split("::")[1]);
                                   Field.setAccessible(new Field[] { f }, true);
                                   if (folder.isEmpty()){
                                       f.set(null, utils.getDirectory());
                                   } else {
                                       f.set(null, new File(utils.getDirectory() + File.separator + folder));
                                   }
                                   System.out.println("File patched: " + xSettings.mcclass + "::" + xSettings.mcversions[j].split("::")[1]);
                                   return;
                               }
                           }
                       }
                       System.out.println("Error: Client version not correct.");
           } catch(Exception e)
           {
               System.out.println("Error: Client field not correct.");
           }
	}