From 15d688ebac066ac210382e288759120a3b935e7b Mon Sep 17 00:00:00 2001 From: Daniel Porter Date: Thu, 2 Dec 2021 15:15:19 +0000 Subject: [PATCH 1/2] Add server.properties override for 'require-resource-pack' This has been named RESOURCE_PACK_ENFORCE for grouping with the other resource pack related properties. --- README.md | 2 ++ scripts/start-setupServerProperties | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index a214f2f52ce..b9c0bb38660 100644 --- a/README.md +++ b/README.md @@ -1067,6 +1067,8 @@ You can set a link to a custom resource pack and set it's checksum using the `RE **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 You can either switch between world saves or run multiple containers with different saves by using the `LEVEL` option, diff --git a/scripts/start-setupServerProperties b/scripts/start-setupServerProperties index 38aa7030e97..0855da5ecbb 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 From 0cb3229192796432b2cba11ce7721365d26a9752 Mon Sep 17 00:00:00 2001 From: Daniel Porter Date: Thu, 2 Dec 2021 15:19:10 +0000 Subject: [PATCH 2/2] Removed escape requirement note Due to updates in setServerPropValue, escaping is no longer required for these values, as this is done automatically by the script. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index b9c0bb38660..afb507960b3 100644 --- a/README.md +++ b/README.md @@ -1063,9 +1063,7 @@ 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' - -**NOTE:** `:` and `=` must be escaped using `\`. The checksum plain-text hexadecimal. + docker run -d -e 'RESOURCE_PACK=http://link.com/to/pack.zip?=1' -e 'RESOURCE_PACK_SHA1=d5db29cd03a2ed055086cef9c31c252b4587d6d0' You can enforce the resource pack on clients by setting `RESOURCE_PACK_ENFORCE` to `TRUE` (default: `FALSE`).