Clarify how backup works.

Add option for auto save-all.
This commit is contained in:
KHobbits 2012-03-26 00:39:39 +01:00
parent 2cc96e995b
commit e30d900289
3 changed files with 10 additions and 3 deletions

View File

@ -61,6 +61,12 @@ public class Backup implements Runnable
{ {
return; return;
} }
if ("save-all".equalsIgnoreCase(command)) {
final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all");
active = false;
return;
}
LOGGER.log(Level.INFO, _("backupStarted")); LOGGER.log(Level.INFO, _("backupStarted"));
final CommandSender cs = server.getConsoleSender(); final CommandSender cs = server.getConsoleSender();
server.dispatchCommand(cs, "save-all"); server.dispatchCommand(cs, "save-all");

View File

@ -22,7 +22,7 @@ public class Commandbackup extends EssentialsCommand
throw new Exception(_("backupDisabled")); throw new Exception(_("backupDisabled"));
} }
final String command = ess.getSettings().getBackupCommand(); final String command = ess.getSettings().getBackupCommand();
if (command == null || "".equals(command)) if (command == null || "".equals(command) || "save-all".equalsIgnoreCase(command))
{ {
throw new Exception(_("backupDisabled")); throw new Exception(_("backupDisabled"));
} }

View File

@ -217,8 +217,9 @@ enabledSigns:
# Backup runs a command while saving is disabled # Backup runs a command while saving is disabled
backup: backup:
# Interval in minutes # Interval in minutes
interval: 60 interval: 30
# Add a command that backups your data, e.g. # 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' #command: 'rdiff-backup World1 backups/World1'
# Set this true to enable permission per warp. # Set this true to enable permission per warp.