Set command blocks enabled on servers by default; improved use of

http world download.
This commit is contained in:
root 2015-12-19 21:48:09 +13:00
parent ef34025dd8
commit e902c6f40f
2 changed files with 25 additions and 4 deletions

View File

@ -21,7 +21,7 @@ online-mode=true
resource-pack= resource-pack=
pvp=true pvp=true
difficulty=1 difficulty=1
enable-command-block=false enable-command-block=true
player-idle-timeout=0 player-idle-timeout=0
gamemode=0 gamemode=0
max-players=20 max-players=20

View File

@ -89,8 +89,19 @@ esac
# If supplied with a URL for a world, download it and unpack # If supplied with a URL for a world, download it and unpack
case "X$WORLD" in case "X$WORLD" in
Xhttp*) Xhttp*)
echo "Downloading world via HTTP"
wget -q -O - $WORLD > /data/world.zip wget -q -O - $WORLD > /data/world.zip
unzip /data/world.zip echo "Unzipping word"
unzip -q /data/world.zip
rm -f /data/world.zip
if [ ! -d /data/world ]; then
echo Renaming world directory...
for i in /data/*/level.dat; do
if [ -f $i ]; then
mv -f `dirname $i` /data/world
fi
done
fi
;; ;;
esac esac
@ -201,19 +212,29 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
fi fi
fi fi
# Make sure files exist to avoid errors
if [ ! -e banned-players.json ]; then
echo '' > banned-players.json
fi
if [ ! -e banned-ip.json ]; then
echo '' > banned-ip.json
fi
# If any modules have been provided, copy them over # If any modules have been provided, copy them over
[ -d /data/mods ] || mkdir /data/mods [ -d /data/mods ] || mkdir /data/mods
for m in /mods/*.jar for m in /mods/*.jar
do do
if [ -f "$m" ]; then if [ -f "$m" ]; then
cp $m /data/mods echo Copying mod `basename $m`
cp -f $m /data/mods
fi fi
done done
[ -d /data/config ] || mkdir /data/config [ -d /data/config ] || mkdir /data/config
for c in /config/* for c in /config/*
do do
if [ -f "$c" ]; then if [ -f "$c" ]; then
cp -r $c /data/config echo Copying configuration `basename $m`
cp -rf $c /data/config
fi fi
done done