Changed backup task to include ALL config files

This commit is contained in:
GJ 2013-02-05 19:02:56 -05:00
parent c07364f775
commit b9ef701ff1
2 changed files with 10 additions and 2 deletions

View File

@ -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.

View File

@ -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... ");