Permalink
Browse files

Make save-off and save-on functionality available directly from the c…

…ommand line, to temporarily disable and re-enable world saving. This is useful if you have your own backup scripts (I do), but you still want to make sure that the world gets backed up in a consistent state (you should).
  • Loading branch information...
1 parent 2a6426e commit 013ebdd1b1366478033ec3618d2e857afa6a4fe7 @djcsdy djcsdy committed Jan 31, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 minecraft
View
@@ -397,6 +397,17 @@ case "$1" in
to_disk
mc_saveon
;;
+ save-off)
+ # Flushes the state of the world to disk, and then disables
+ # saving until save-on is called (useful if you have your own
+ # backup scripts).
+ mc_saveoff
+ to_disk
+ ;;
+ save-on)
+ # Re-enables saving if it was disabled by save-off.
+ mc_saveon
+ ;;
connected)
# Lists connected users
as_user "screen -p 0 -S $SCREEN -X eval 'stuff list\015'"
@@ -462,6 +473,8 @@ case "$1" in
echo "update - fetches the latest version of minecraft.jar server and Bukkit"
echo "log-roll - Moves and gzips the logfile"
echo "to-disk - copies the worlds from the ramdisk to worldstorage"
+ echo "save-off - flushes the world to disk and then disables saving until save-on is called"
+ echo "save-on - re-enables saving if it was previously disabled by save-off"
echo "connected - lists connected users"
echo "status - Shows server status"
echo "version - returs Bukkit version"

0 comments on commit 013ebdd

Please sign in to comment.