Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 013ebdd1b1366478033ec3618d2e857afa6a4fe7 1 parent 2a6426e
@djcsdy djcsdy authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 minecraft
View
13 minecraft
@@ -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"
Please sign in to comment.
Something went wrong with that request. Please try again.