From 0419dca385f4fb21129f50692366b5618d90314c Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 15 Feb 2013 07:53:25 -0500 Subject: [PATCH] Config files are now backed up even when running in SQL mode --- Changelog.txt | 1 + .../net/shatteredlands/shatt/backup/ZipLibrary.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index e23518021..dd2192d8b 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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 Disarm and Deflect had wrong values = 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. ! 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 diff --git a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java index e1bf22374..2720051aa 100644 --- a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java +++ b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java @@ -28,15 +28,16 @@ public class ZipLibrary { public static void mcMMObackup() throws IOException { if (Config.getInstance().getUseMySQL()) { - mcMMO.p.getLogger().info("No Backup performed, in SQL Mode."); - return; + mcMMO.p.getLogger().info("This server is running in SQL Mode."); + mcMMO.p.getLogger().info("Only config files will be backed up."); } try { if (BackupDir.mkdir()) { mcMMO.p.getLogger().info("Created Backup Directory."); } - } catch (Exception e) { + } + catch (Exception e) { mcMMO.p.getLogger().severe(e.toString()); } @@ -47,7 +48,10 @@ public class ZipLibrary { //Create the Source List, and add directories/etc to the file. List sources = new ArrayList(); - sources.add(FlatFileDirectory); + if (!Config.getInstance().getUseMySQL()) { + sources.add(FlatFileDirectory); + } + sources.add(ConfigFile); sources.add(TreasuresFile); sources.add(AdvancedConfigFile);