Skip to content
This repository
Browse code

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
Daniel Cassidy djcsdy authored

Showing 1 changed file with 13 additions and 0 deletions. Show diff stats Hide diff stats

  1. +13 0 minecraft
13 minecraft
@@ -397,6 +397,17 @@ case "$1" in
397 397 to_disk
398 398 mc_saveon
399 399 ;;
  400 + save-off)
  401 + # Flushes the state of the world to disk, and then disables
  402 + # saving until save-on is called (useful if you have your own
  403 + # backup scripts).
  404 + mc_saveoff
  405 + to_disk
  406 + ;;
  407 + save-on)
  408 + # Re-enables saving if it was disabled by save-off.
  409 + mc_saveon
  410 + ;;
400 411 connected)
401 412 # Lists connected users
402 413 as_user "screen -p 0 -S $SCREEN -X eval 'stuff list\015'"
@@ -462,6 +473,8 @@ case "$1" in
462 473 echo "update - fetches the latest version of minecraft.jar server and Bukkit"
463 474 echo "log-roll - Moves and gzips the logfile"
464 475 echo "to-disk - copies the worlds from the ramdisk to worldstorage"
  476 + echo "save-off - flushes the world to disk and then disables saving until save-on is called"
  477 + echo "save-on - re-enables saving if it was previously disabled by save-off"
465 478 echo "connected - lists connected users"
466 479 echo "status - Shows server status"
467 480 echo "version - returs Bukkit version"

0 comments on commit 013ebdd

Please sign in to comment.
Something went wrong with that request. Please try again.