Config files are now backed up even when running in SQL mode

This commit is contained in:
GJ 2013-02-15 07:53:25 -05:00
parent 11bd473f55
commit 0419dca385
2 changed files with 9 additions and 4 deletions

View File

@ -65,6 +65,7 @@ Version 1.4.00-dev
= Fixed a bug where a new party leader wasn't appointed, after the previous party leader left = Fixed a bug where a new party leader wasn't appointed, after the previous party leader left
= Fixed a bug where Disarm and Deflect had wrong values = Fixed a bug where Disarm and Deflect had wrong values
= Fixed Magic Hunter (Fishing ability) favoring certain enchants = Fixed Magic Hunter (Fishing ability) favoring certain enchants
! Config files are now backed up even when running in SQL mode
! Changed /p and /a to use /partychat and /adminchat as the default command name. The use of /p, /pc, /a, and /ac is still supported. ! Changed /p and /a to use /partychat and /adminchat as the default command name. The use of /p, /pc, /a, and /ac is still supported.
! We're now using Bukkit sounds instead of Spout sounds. ! We're now using Bukkit sounds instead of Spout sounds.
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly ! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly

View File

@ -28,15 +28,16 @@ public class ZipLibrary {
public static void mcMMObackup() throws IOException { public static void mcMMObackup() throws IOException {
if (Config.getInstance().getUseMySQL()) { if (Config.getInstance().getUseMySQL()) {
mcMMO.p.getLogger().info("No Backup performed, in SQL Mode."); mcMMO.p.getLogger().info("This server is running in SQL Mode.");
return; mcMMO.p.getLogger().info("Only config files will be backed up.");
} }
try { try {
if (BackupDir.mkdir()) { if (BackupDir.mkdir()) {
mcMMO.p.getLogger().info("Created Backup Directory."); mcMMO.p.getLogger().info("Created Backup Directory.");
} }
} catch (Exception e) { }
catch (Exception e) {
mcMMO.p.getLogger().severe(e.toString()); mcMMO.p.getLogger().severe(e.toString());
} }
@ -47,7 +48,10 @@ public class ZipLibrary {
//Create the Source List, and add directories/etc to the file. //Create the Source List, and add directories/etc to the file.
List<File> sources = new ArrayList<File>(); List<File> sources = new ArrayList<File>();
if (!Config.getInstance().getUseMySQL()) {
sources.add(FlatFileDirectory); sources.add(FlatFileDirectory);
}
sources.add(ConfigFile); sources.add(ConfigFile);
sources.add(TreasuresFile); sources.add(TreasuresFile);
sources.add(AdvancedConfigFile); sources.add(AdvancedConfigFile);