Added config option to disable automatic zip backups

This commit is contained in:
GJ 2013-02-15 07:50:32 -05:00
parent 5947ad5004
commit 11bd473f55
4 changed files with 12 additions and 6 deletions

View File

@ -32,6 +32,7 @@ Version 1.4.00-dev
+ Added "Chinese (Taiwan)" localization files (zh_TW)
+ Added '/hardcore' and '/vampirism' commands for toggling these modes on or off.
+ Added Block Cracker to Unarmed's Berserk, turn smooth brick into cracked smooth brick
+ Added config option to disable automatic zip backups.
= Fixed Green Terra not also checking Green Thumb permissions
= Fixed bug where splash potions could raise a player's unarmed level
= Fixed bug where fired arrows could raise skill levels other than Archery

View File

@ -36,6 +36,7 @@ public class Config extends ConfigLoader {
public int getSaveInterval() { return config.getInt("General.Save_Interval", 10); }
public boolean getStatsTrackingEnabled() { return config.getBoolean("General.Stats_Tracking", true); }
public boolean getEventCallbackEnabled() { return config.getBoolean("General.Event_Callback", true); }
public boolean getBackupsEnabled() { return config.getBoolean("General.Generate_Backups", true); }
public boolean getPartyDisplayNames() { return config.getBoolean("Commands.p.Use_Display_Names", true); }
public boolean getAdminDisplayNames() { return config.getBoolean("Commands.a.Use_Display_Names", true); }

View File

@ -186,12 +186,14 @@ public class mcMMO extends JavaPlugin {
placeStore.saveAll(); // Save our metadata
placeStore.cleanUp(); // Cleanup empty metadata stores
// Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
try {
ZipLibrary.mcMMObackup();
}
catch (IOException e) {
getLogger().severe(e.toString());
if (Config.getInstance().getBackupsEnabled()) {
// Remove other tasks BEFORE starting the Backup, or we just cancel it straight away.
try {
ZipLibrary.mcMMObackup();
}
catch (IOException e) {
getLogger().severe(e.toString());
}
}
getLogger().info("Was disabled."); //How informative!

View File

@ -16,6 +16,8 @@ General:
Stats_Tracking: true
#Allow mcMMO to inform other plugins of damage being dealt
Event_Callback: true
#Allow mcMMO to create zip backups for flatfile data on shutdown.
Generate_Backups: true
Power_Level_Cap: 0
Database_Purging: