diff --git a/.github/workflows/build-multiarch.yml b/.github/workflows/build-multiarch.yml index 7ca171d7..bcc21354 100644 --- a/.github/workflows/build-multiarch.yml +++ b/.github/workflows/build-multiarch.yml @@ -44,7 +44,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bebc752a..0f43c66d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Cache Docker layers - uses: actions/cache@v2.1.6 + uses: actions/cache@v2.1.7 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} diff --git a/README.md b/README.md index 0216b4e5..30c0b863 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ By default, the container will download the latest version of the "vanilla" [Min * [Running on RaspberryPi](#running-on-raspberrypi) * [Contributing](#contributing) - + @@ -846,8 +846,14 @@ To whitelist players for your Minecraft server, pass the Minecraft usernames sep docker run -d -e WHITELIST=user1,user2 ... +or + + docker run -d -e WHITELIST=uuid1,uuid2 ... + If the `WHITELIST` environment variable is not used, any user can join your Minecraft server if it's publicly accessible. +> NOTE: When using uuids in the whitelist, please make sure it is the dashed variant otherwise it will not parse correctly. + > NOTE: When `WHITELIST` is used the server properties `white-list` and `whitelist` will automatically get set to `true`. > By default, the players in `WHITELIST` are **added** to the final `whitelist.json` file by the Minecraft server. If you set `OVERRIDE_WHITELIST` to "true" then the `whitelist.json` file will be recreated on each server startup. @@ -1057,9 +1063,9 @@ In Minecraft 1.13+ you need to pass json ([generator site](https://misode.github You can set a link to a custom resource pack and set it's checksum using the `RESOURCE_PACK` and `RESOURCE_PACK_SHA1` options respectively, the default is blank: - docker run -d -e 'RESOURCE_PACK=http\://link.com/to/pack.zip?\=1' -e 'RESOURCE_PACK_SHA1=d5db29cd03a2ed055086cef9c31c252b4587d6d0' + docker run -d -e 'RESOURCE_PACK=http://link.com/to/pack.zip?=1' -e 'RESOURCE_PACK_SHA1=d5db29cd03a2ed055086cef9c31c252b4587d6d0' -**NOTE:** `:` and `=` must be escaped using `\`. The checksum plain-text hexadecimal. +You can enforce the resource pack on clients by setting `RESOURCE_PACK_ENFORCE` to `TRUE` (default: `FALSE`). ### Level / World Save Name diff --git a/scripts/start-deployBukkitSpigot b/scripts/start-deployBukkitSpigot index d673bab4..03779dc8 100755 --- a/scripts/start-deployBukkitSpigot +++ b/scripts/start-deployBukkitSpigot @@ -64,7 +64,7 @@ function downloadSpigot { fi if [[ -z $downloadUrl ]]; then - if versionLessThan 1.16.5; then + if versionLessThan 1.16.5 || ([[ ${getbukkitFlavor} = "craftbukkit" ]] && [[ ${VANILLA_VERSION} = "1.16.5" ]]); then downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar" else downloadUrl="https://download.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VANILLA_VERSION}.jar" diff --git a/scripts/start-finalExec b/scripts/start-finalExec index 1112f104..519883e9 100755 --- a/scripts/start-finalExec +++ b/scripts/start-finalExec @@ -16,7 +16,11 @@ fi if [ -n "$WHITELIST" ]; then log "Updating whitelist" rm -f /data/white-list.txt.converted - echo $WHITELIST | awk -v RS=, '{print}' > /data/white-list.txt + if [[ $WHITELIST == *"-"* ]]; then + echo $WHITELIST | awk -v RS=, '{print}' | xargs -l -i curl -s https://playerdb.co/api/player/minecraft/{} | jq -r '.["data"]["player"] | {"uuid": .id, "name": .username}' | jq -s . > "whitelist.json" + else + echo $WHITELIST | awk -v RS=, '{print}' > /data/white-list.txt + fi fi if isTrue "${OVERRIDE_WHITELIST}"; then log "Recreating whitelist.json file at server startup" diff --git a/scripts/start-setupServerProperties b/scripts/start-setupServerProperties index 38aa7030..0855da5e 100755 --- a/scripts/start-setupServerProperties +++ b/scripts/start-setupServerProperties @@ -91,6 +91,7 @@ function customizeServerProps { setServerProp "allow-flight" ALLOW_FLIGHT setServerProp "resource-pack" RESOURCE_PACK setServerProp "resource-pack-sha1" RESOURCE_PACK_SHA1 + setServerProp "require-resource-pack" RESOURCE_PACK_ENFORCE setServerProp "player-idle-timeout" PLAYER_IDLE_TIMEOUT setServerProp "broadcast-console-to-ops" BROADCAST_CONSOLE_TO_OPS setServerProp "broadcast-rcon-to-ops" BROADCAST_RCON_TO_OPS