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=
|
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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user