Bladeren bron

Changed backup task to include ALL config files

GJ 12 jaren geleden
bovenliggende
commit
b9ef701ff1
2 gewijzigde bestanden met toevoegingen van 10 en 2 verwijderingen
  1. 1 0
      Changelog.txt
  2. 9 2
      src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java

+ 1 - 0
Changelog.txt

@@ -63,6 +63,7 @@ Version 1.4.00-dev
  ! Changed Excavation to have individual XP values for each block type, rather than a base XP value.
  ! Changed the way party teleportation works. When using /ptp, the target player needs to confirm the teleport before it takes place. (Configurable)
  ! Changed BeastLore: Now also displays offline player names
+ ! Changed backup task to include ALL config files
  - Removed Party "master/apprentice" system. Replaced with the new party XP share feature.
  - Removed unused "healthbar" files from the resources
  - Removed config options for disabling commands from the config.yml. This should instead be done through permissions.

+ 9 - 2
src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java

@@ -20,9 +20,11 @@ public class ZipLibrary {
     private static File BackupDir = new File(BackupDirectory);
     private static File FlatFileDirectory = new File(mcMMO.getFlatFileDirectory());
     private static File ModFileDirectory = new File(mcMMO.getModDirectory());
-    private static File UsersFile = new File(mcMMO.getUsersFilePath());
     private static File ConfigFile = new File(mcMMO.getMainDirectory() + "config.yml");
     private static File TreasuresFile = new File(mcMMO.getMainDirectory() + "treasures.yml");
+    private static File AdvancedConfigFile = new File(mcMMO.getMainDirectory() + "advanced.yml");
+    private static File SpoutFile = new File(mcMMO.getMainDirectory() + "spout.yml");
+    private static File RepairFile = new File(mcMMO.getMainDirectory() + "repair.vanilla.yml");
 
     public static void mcMMObackup() throws IOException {
         if (Config.getInstance().getUseMySQL()) {
@@ -46,14 +48,19 @@ public class ZipLibrary {
         //Create the Source List, and add directories/etc to the file.
         List<File> sources = new ArrayList<File>();
         sources.add(FlatFileDirectory);
-        sources.add(UsersFile);
         sources.add(ConfigFile);
         sources.add(TreasuresFile);
+        sources.add(AdvancedConfigFile);
+        sources.add(RepairFile);
 
         if (ModFileDirectory.exists()) {
             sources.add(ModFileDirectory);
         }
 
+        if (SpoutFile.exists()) {
+            sources.add(SpoutFile);
+        }
+
         //Actually do something
         System.out.println("Backing up your mcMMO Configuration... ");