Last active
December 15, 2015 05:29
-
-
Save inertia186/5208884 to your computer and use it in GitHub Desktop.
[Minecraft, SMP] Here's how the staff can invoke the mc-slap.rb script I posted previously. As always, this assumes you run the Minecraft server in a screen session named "minecraft".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MC="/Users/steve/Minecraft" | |
RUBY="/Users/steve/.rvm/rubies/ruby-1.9.3-p374/bin/ruby" | |
if [ -z "$1" ]; then | |
echo $0 \[target\] | |
fi | |
target=$1 | |
slap=`$RUBY $MC/scripts/mc-slap.rb $target` | |
cmd="me $slap" | |
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
This shell script requires the mc-slap.rb script installed (or symbolically linked) in scripts:
https://gist.github.com/inertia186/5002463