From feae4db98f0a3ac748edd60e749001b9e8a11307 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 26 Mar 2012 00:39:39 +0100 Subject: Clarify how backup works. Add option for auto save-all. --- Essentials/src/com/earth2me/essentials/Backup.java | 6 ++++++ Essentials/src/com/earth2me/essentials/commands/Commandbackup.java | 2 +- Essentials/src/config.yml | 5 +++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/Backup.java b/Essentials/src/com/earth2me/essentials/Backup.java index ada36c9d7..baa90e561 100644 --- a/Essentials/src/com/earth2me/essentials/Backup.java +++ b/Essentials/src/com/earth2me/essentials/Backup.java @@ -61,6 +61,12 @@ public class Backup implements Runnable { return; } + if ("save-all".equalsIgnoreCase(command)) { + final CommandSender cs = server.getConsoleSender(); + server.dispatchCommand(cs, "save-all"); + active = false; + return; + } LOGGER.log(Level.INFO, _("backupStarted")); final CommandSender cs = server.getConsoleSender(); server.dispatchCommand(cs, "save-all"); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java index 9a10100c0..38644c680 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbackup.java @@ -22,7 +22,7 @@ public class Commandbackup extends EssentialsCommand throw new Exception(_("backupDisabled")); } final String command = ess.getSettings().getBackupCommand(); - if (command == null || "".equals(command)) + if (command == null || "".equals(command) || "save-all".equalsIgnoreCase(command)) { throw new Exception(_("backupDisabled")); } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index a1e099271..133557030 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -217,8 +217,9 @@ enabledSigns: # Backup runs a command while saving is disabled backup: # Interval in minutes - interval: 60 - # Add a command that backups your data, e.g. + interval: 30 + # Unless you add a valid backup command or script here, this feature will be useless. + # Use 'save-all' to simply force regular world saving without backup. #command: 'rdiff-backup World1 backups/World1' # Set this true to enable permission per warp. -- cgit v1.2.3