diff --git a/Changelog.txt b/Changelog.txt index 67c5f7307..9574f640d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -15,7 +15,6 @@ Version 1.3.07 + Added permission nodes for Treasure & Magic Hunter for Fishing + Added config options for enabling/disabling specific double drops + Added automatic zip backup of flatfile database - = Fixed zip backup performing when running in SQL mode. = Fixed bug where the permission node for Impact didn't work = Fixed some bypass nodes defaulting true for Ops ! Changed Mining to ignore blocks when the pick is enchanted with Silk Touch diff --git a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java index 5d6018b0b..fc0beb675 100644 --- a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java +++ b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java @@ -25,19 +25,18 @@ public class ZipLibrary { private static File Leaderboards = new File(mcMMO.leaderboardDirectory); public static void mcMMObackup() throws IOException { - - if (Config.getInstance().getUseMySQL()) { - System.out.println("No Backup performed, in SQL Mode."); - return; - } - - try { - if (BackupDir.mkdir()) { + if (Config.getInstance().getUseMySQL()) { + System.out.println("No Backup performed, in SQL Mode."); + return; + } + + try { + if (BackupDir.mkdir()) { mcMMO.p.getLogger().info("Created Backup Directory."); - } - } catch (Exception e) { - mcMMO.p.getLogger().severe(e.toString()); } + } catch (Exception e) { + mcMMO.p.getLogger().severe(e.toString()); + } //Generate the proper date for the backup filename @@ -58,8 +57,7 @@ public class ZipLibrary { packZip(fileZip, sources); } - private static void packZip(File output, List sources) throws IOException - { + private static void packZip(File output, List sources) throws IOException { ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(output)); zipOut.setLevel(Deflater.DEFAULT_COMPRESSION); @@ -88,7 +86,7 @@ public class ZipLibrary { private static void zipDir(ZipOutputStream zos, String path, File dir) throws IOException { if (!dir.canRead()) { - System.out.println("Cannot read " + dir.getCanonicalPath() + " (maybe because of permissions)"); + System.out.println("Cannot read " + dir.getCanonicalPath() + " (Maybe because of permissions?)"); return; }