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 | |
## A small wrapper around the mcrcon binary. | |
## | |
## See: https://forums.bukkit.org/threads/admin-rcon-mcrcon-remote-connection-client-for-minecraft-servers.70910/ | |
MC="/path/to/server" | |
RCON_EXEC="$MC/scripts/gits/mcrcon-code/mcrcon" | |
RCON_HOST="127.0.0.1" | |
RCON_PORT=25577 |
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 | |
## Just a link, without the [Server] prepend. This is used by link-triggers.sh. | |
MC="/path/to/server" | |
WGET="/opt/local/bin/wget" | |
W3M="/opt/local/bin/w3m" | |
function urldecode { | |
echo -e "$(sed 's/+/ /g;s/%\(..\)/\\x/g;')" |
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 | |
export LANG="en_US.UTF-8" | |
MC=/Users/steve/Minecraft | |
# Many of these options are explaiend here: | |
# http://stas-blogspot.blogspot.com/2011/07/most-complete-list-of-xx-options-for.html | |
# http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html | |
# http://blog.ragozin.info/2011/09/hotspot-jvm-garbage-collection-options.html |
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
## Cleanly recovers from a crash event. | |
IFS=$'\n' | |
MC="/Users/steve/Minecraft" | |
LOG="$MC/logs/latest.log" | |
ALERT="$MC/scripts/alert-admin.sh" | |
error="$2" | |
if [ -n "$error" ]; then | |
path="`echo "$error" | cut -f 8 -d " "`" |
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
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'" |
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
MC="/Users/steve/Minecraft" | |
for player in `cat $MC/ops.txt` | |
do | |
query=`$MC/scripts/Dinnerbone-mcstatus-a24e563/cli.py localhost | grep -i $player | wc -l` | |
query=$(sed -e 's/^[[:space:]]*//' <<<"$query") | |
if [ $query -eq 0 ]; then | |
echo Skipping $player, not logged in. |
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
TARGET="@a[m=0]" | |
LIST="7 19 90 119 137 383" | |
for item in $LIST; do | |
cmd="clear $TARGET $item" | |
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'" | |
echo $cmd | |
done |
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/ | |
echo \#\#\# | |
echo \#\#\# It is normal to see a \"NameError: global name 'socket' is not defined\" here if the server really is down. | |
echo \#\#\# | |
query=`$MC/scripts/Dinnerbone-mcstatus-a24e563/cli.py -t 1 -r 0 localhost | wc -l` | |
query=$(sed -e 's/^[[:space:]]*//' <<<"$query") |
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
cmd="say $1 will be banned in 15 seconds. Reason: $2" | |
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'" | |
sleep 15 | |
cmd="ban $1 $2" | |
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'" |
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" | |
cmd="say Restarting in 5 minutes." | |
echo $cmd | |
bash -c "screen -p 0 -S minecraft -X eval 'stuff \"$cmd\"\015'" | |
sleep 60 | |
cmd="say Restarting in 4 minutes." |
OlderNewer