summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-03-26 00:39:39 +0100
committerKHobbits <rob@khobbits.co.uk>2012-03-26 00:49:53 +0100
commite30d9002891113200c2b8e0bfdc19cf5e4402925 (patch)
tree733f04294056d365a9e0b462d69da890c5cb036c
parent2cc96e995b2040baa56ba3b6bf58c5766b588708 (diff)
downloadEssentials-e30d9002891113200c2b8e0bfdc19cf5e4402925.tar
Essentials-e30d9002891113200c2b8e0bfdc19cf5e4402925.tar.gz
Essentials-e30d9002891113200c2b8e0bfdc19cf5e4402925.tar.lz
Essentials-e30d9002891113200c2b8e0bfdc19cf5e4402925.tar.xz
Essentials-e30d9002891113200c2b8e0bfdc19cf5e4402925.zip
Clarify how backup works.
Add option for auto save-all.
-rw-r--r--Essentials/src/com/earth2me/essentials/Backup.java6
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbackup.java2
-rw-r--r--Essentials/src/config.yml5
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.