コード例 #1
0
 /*     */ public static void backupGame(File zipDestiny, boolean wholegame) /*     */ {
   /*     */ File[] source;
   /*     */ File[] source;
   /*  33 */ if (!wholegame) {
     /*  34 */ ArrayList contents = new ArrayList();
     /*     */
     /*  36 */ File f = MinecraftUtil.getBinFolder();
     /*  37 */ if (f.exists()) {
       /*  38 */ contents.add(f);
       /*     */ }
     /*  40 */ f = MinecraftUtil.getResourcesFolder();
     /*  41 */ if (f.exists()) {
       /*  42 */ contents.add(f);
       /*     */ }
     /*  44 */ f = MinecraftUtil.getLoginFile();
     /*  45 */ if (f.exists()) {
       /*  46 */ contents.add(f);
       /*     */ }
     /*  48 */ f = MinecraftUtil.getOptionsFile();
     /*  49 */ if (f.exists()) {
       /*  50 */ contents.add(f);
       /*     */ }
     /*  52 */ source = (File[]) contents.toArray(new File[contents.size()]);
     /*     */ } else {
     /*  54 */ source = MinecraftUtil.getWorkingDirectory().listFiles();
     /*     */ }
   /*  56 */ backupContents(source, zipDestiny, "minecraft_backup", "mcgame");
   /*     */ }
コード例 #2
0
 @SuppressWarnings({"rawtypes", "unchecked"})
 public static void backupGame(File zipDestiny, boolean wholegame) {
   File[] source;
   if (!wholegame) {
     ArrayList contents = new ArrayList();
     File f = MinecraftUtil.getBinFolder();
     if (f.exists()) {
       contents.add(f);
     }
     f = MinecraftUtil.getResourcesFolder();
     if (f.exists()) {
       contents.add(f);
     }
     f = MinecraftUtil.getLoginFile();
     if (f.exists()) {
       contents.add(f);
     }
     f = MinecraftUtil.getOptionsFile();
     if (f.exists()) {
       contents.add(f);
     }
     source = (File[]) contents.toArray(new File[contents.size()]);
   } else {
     source = MinecraftUtil.getWorkingDirectory().listFiles();
   }
   backupContents(source, zipDestiny, "minecraft_backup", "mcgame");
 }
コード例 #3
0
 /*     */ public static void uninstallGame(boolean includeSaves) /*     */ {
   /*  22 */ deleteFileDir(MinecraftUtil.getBinFolder());
   /*  23 */ deleteFileDir(MinecraftUtil.getLoginFile());
   /*  24 */ deleteFileDir(MinecraftUtil.getResourcesFolder());
   /*  25 */ deleteFileDir(MinecraftUtil.getOptionsFile());
   /*  26 */ if (includeSaves) /*  27 */ deleteFileDir(MinecraftUtil.getSavesFolder());
   /*     */ }
コード例 #4
0
 public static void uninstallGame(boolean includeSaves) {
   deleteFileDir(MinecraftUtil.getBinFolder());
   deleteFileDir(MinecraftUtil.getLoginFile());
   deleteFileDir(MinecraftUtil.getResourcesFolder());
   deleteFileDir(MinecraftUtil.getOptionsFile());
   if (includeSaves) {
     deleteFileDir(MinecraftUtil.getSavesFolder());
   }
 }