mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
Set command blocks enabled on servers by default; improved use of
http world download.
This commit is contained in:
parent
ef34025dd8
commit
e902c6f40f
@ -21,7 +21,7 @@ online-mode=true
|
||||
resource-pack=
|
||||
pvp=true
|
||||
difficulty=1
|
||||
enable-command-block=false
|
||||
enable-command-block=true
|
||||
player-idle-timeout=0
|
||||
gamemode=0
|
||||
max-players=20
|
||||
|
@ -89,8 +89,19 @@ esac
|
||||
# If supplied with a URL for a world, download it and unpack
|
||||
case "X$WORLD" in
|
||||
Xhttp*)
|
||||
echo "Downloading world via HTTP"
|
||||
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
|
||||
|
||||
@ -201,19 +212,29 @@ if [ -n "$ICON" -a ! -e server-icon.png ]; then
|
||||
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
|
||||
[ -d /data/mods ] || mkdir /data/mods
|
||||
for m in /mods/*.jar
|
||||
do
|
||||
if [ -f "$m" ]; then
|
||||
cp $m /data/mods
|
||||
echo Copying mod `basename $m`
|
||||
cp -f $m /data/mods
|
||||
fi
|
||||
done
|
||||
[ -d /data/config ] || mkdir /data/config
|
||||
for c in /config/*
|
||||
do
|
||||
if [ -f "$c" ]; then
|
||||
cp -r $c /data/config
|
||||
echo Copying configuration `basename $m`
|
||||
cp -rf $c /data/config
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user