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;
}
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");

View File

@ -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"));
}

View File

@ -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.