When the backup script I use is called by the mod, players experience a short lag spike. This is perfectly normal, but they aren't warned of this beforehand, as the message signaling the start and completion of the backup are shown to ops only. It would be nice if there was a way to set up messages sent to all players in the configuration file. As an example, here is how I would see it:
timeBeforePreBackupMessage: The amount of time in seconds before the backup where the server sends the pre-backup notice. Defaults to 10 seconds, disables the pre-backup warning entirely if set to 0 or less.
preBackupMessage: A message sent to all players a certain amount of time before the backup happens, as set by timeBeforePreBackupMessage. Should support a {time} variable which would be replaced by the value of timeBeforePreBackupMessage when sent.
backupStartMessage: A message sent to all players right as the backup happens.
backupCompleteMessage: A message sent to all players right after the backup is complete.
(Optionally) backupFailedMessage: A message sent to all players after a failed backup.
Additionally, a timer tied to these messages might be a nice feature to have:
backupTimerMessage: A setting which sends messages counting down the time before backup. Should support a {remaining} variable which is replaced by however many seconds are left before the backup when the message is sent.
skipFirstTimerMessage: An option which, if true, does not send the countdown message for the first iteration of the countdown. Useful if the backup message already mentions the time before backup. Defaults to true.
backupTimerInterval: An option which sets how many seconds pass between each countdown message. For example, if timeBeforePreBackupMessage is set to 60 seconds, skipFirstCountdown is set to true, and this option is set to 10 seconds, the countdown will send a message at 50 seconds, 40, 30, 20, and 10 seconds. Defaults to 1, disables the countdown if zero, no effect if backupTimerMessage is empty.
Any of the message settings would be disabled if empty, which would be their default value. Ideally, the messages should support Minecraft formatting codes.
Alternative solution: Specify a script to run before anything else occurs. That would allow users to fully customize things like chat messages sent in game, delays, and things like that.
When the backup script I use is called by the mod, players experience a short lag spike. This is perfectly normal, but they aren't warned of this beforehand, as the message signaling the start and completion of the backup are shown to ops only. It would be nice if there was a way to set up messages sent to all players in the configuration file. As an example, here is how I would see it:
timeBeforePreBackupMessage
: The amount of time in seconds before the backup where the server sends the pre-backup notice. Defaults to 10 seconds, disables the pre-backup warning entirely if set to 0 or less.preBackupMessage
: A message sent to all players a certain amount of time before the backup happens, as set bytimeBeforePreBackupMessage
. Should support a{time}
variable which would be replaced by the value oftimeBeforePreBackupMessage
when sent.backupStartMessage
: A message sent to all players right as the backup happens.backupCompleteMessage
: A message sent to all players right after the backup is complete.backupFailedMessage
: A message sent to all players after a failed backup.Additionally, a timer tied to these messages might be a nice feature to have:
backupTimerMessage
: A setting which sends messages counting down the time before backup. Should support a{remaining}
variable which is replaced by however many seconds are left before the backup when the message is sent.skipFirstTimerMessage
: An option which, if true, does not send the countdown message for the first iteration of the countdown. Useful if the backup message already mentions the time before backup. Defaults to true.backupTimerInterval
: An option which sets how many seconds pass between each countdown message. For example, iftimeBeforePreBackupMessage
is set to 60 seconds,skipFirstCountdown
is set to true, and this option is set to 10 seconds, the countdown will send a message at 50 seconds, 40, 30, 20, and 10 seconds. Defaults to 1, disables the countdown if zero, no effect ifbackupTimerMessage
is empty.Any of the message settings would be disabled if empty, which would be their default value. Ideally, the messages should support Minecraft formatting codes.