Skip to content

Instantly share code, notes, and snippets.

@inertia186
Last active December 13, 2015 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inertia186/4973180 to your computer and use it in GitHub Desktop.
Save inertia186/4973180 to your computer and use it in GitHub Desktop.
[Minecraft, SMP] Butchers all hostile mobs by switching to Peaceful then back to Normal.
cmd="difficulty 0"
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'"
sleep 1 # This is required so that the commands happen in different game ticks.
cmd="difficulty 2"
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment