Compare commits

...

76 Commits

Author SHA1 Message Date
Geoff Bourne
7651f3da07 Auto-merging via docker-versions-create 2021-11-15 20:49:10 -06:00
itzg
9544aeaf7a docs: Auto update markdown TOC 2021-11-16 02:46:53 +00:00
Geoff Bourne
babeac1693 docs: removed dangling sentence in Fabric section
#1121
2021-11-15 20:46:40 -06:00
Geoff Bourne
0bf77c18b0 Auto-merging via docker-versions-create 2021-11-13 19:18:27 -06:00
Geoff Bourne
130b067955 fix: changed logging config's queue to TerminalConsole
#1119
2021-11-13 19:17:20 -06:00
Geoff Bourne
55d272141d Auto-merging via docker-versions-create 2021-11-13 18:53:00 -06:00
Geoff Bourne
df7d6c298a fix: defaulted SERVER_PORT for health and autopause
#1120
2021-11-13 18:42:24 -06:00
Geoff Bourne
b8b5fba660 Auto-merging via docker-versions-create 2021-11-12 21:24:49 -06:00
Geoff Bourne
a8a60264e9 misc: code cleanup in start-setupServerProperties 2021-11-12 21:21:01 -06:00
itzg
721df8d32b docs: Auto update markdown TOC 2021-11-13 03:18:08 +00:00
Geoff Bourne
2375a6796c feat: Allowed for server properties to be cleared vs skipped
#1117
2021-11-12 21:17:21 -06:00
dependabot[bot]
e04e943e1c build(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#1112) 2021-11-08 07:00:59 -06:00
Geoff Bourne
1bf75671f6 misc: adjusted bug and question templates 2021-11-06 21:58:22 -05:00
Geoff Bourne
7d56de9d15 Cleaned up minecraft_server.jar for versions >= 1.6
#306
2021-11-06 21:46:31 -05:00
Geoff Bourne
8a8ec9e52e Auto-merging via docker-versions-create 2021-11-06 21:39:58 -05:00
Geoff Bourne
a8de790b57 Used minecraft_server.jar for versions before 1.6
#306
2021-11-06 21:35:57 -05:00
Geoff Bourne
cafddd3b12 Used minecraft_server.jar for versions before 1.6
#306
2021-11-06 21:34:24 -05:00
itzg
fc958faf7b docs: Auto update markdown TOC 2021-11-05 19:39:25 +00:00
Michael Vorburger ⛑️
402894cd8d document that default RCON_PASSWORD = minecraft in README (#1109) 2021-11-05 14:38:02 -05:00
Geoff Bourne
f97cea4b06 misc: adjusted debug logs when SKIP_SERVER_PROPERTIES
#1108
2021-11-04 21:49:03 -05:00
Geoff Bourne
1ee8ad87ba Auto-merging via docker-versions-create 2021-11-04 21:06:45 -05:00
Geoff Bourne
d8f256954c Auto-merging via docker-versions-create 2021-10-31 09:48:08 -05:00
Geoff Bourne
e741bf325d Merge branch 'master' into java16 2021-10-27 21:13:08 -05:00
Geoff Bourne
583574281b Auto-merging via docker-versions-create 2021-10-25 19:25:36 -05:00
Geoff Bourne
235646840c Auto-merging via docker-versions-create 2021-10-24 20:30:30 -05:00
Geoff Bourne
60b26f02ec Auto-merging via docker-versions-create 2021-10-23 09:46:14 -05:00
Geoff Bourne
c7a4f87e8e Auto-merging via docker-versions-create 2021-10-22 15:56:28 -05:00
Geoff Bourne
70b56c3e28 Merge branch 'master' into java16 2021-10-20 15:36:45 -05:00
Geoff Bourne
87949bf7c1 Auto-merging via docker-versions-create 2021-10-18 22:16:14 -05:00
Geoff Bourne
0e39351ba8 Auto-merging via docker-versions-create 2021-10-17 14:55:03 -05:00
Geoff Bourne
f85673a72e Auto-merging via docker-versions-create 2021-10-15 18:59:36 -05:00
Geoff Bourne
56a00aa416 Auto-merging via docker-versions-create 2021-10-15 18:50:33 -05:00
Geoff Bourne
e6a420036d Auto-merging via docker-versions-create 2021-10-10 09:58:30 -05:00
Geoff Bourne
52f5660e72 Auto-merging via docker-versions-create 2021-10-09 15:27:38 -05:00
Geoff Bourne
fb949d2fdd Auto-merging via docker-versions-create 2021-10-09 12:06:13 -05:00
Geoff Bourne
79714cd6c7 Auto-merging via docker-versions-create 2021-10-02 19:24:10 -05:00
Geoff Bourne
a2f61da686 Auto-merging via docker-versions-create 2021-09-29 10:27:09 -05:00
Geoff Bourne
332b5b3eb9 Auto-merging via docker-versions-create 2021-09-27 20:42:51 -05:00
Geoff Bourne
45a85c83b0 Auto-merging via docker-versions-create 2021-09-20 12:32:17 -05:00
Geoff Bourne
c046a5855e Auto-merging via docker-versions-create 2021-09-15 21:32:54 -05:00
Geoff Bourne
19eebae327 Auto-merging via docker-versions-create 2021-09-15 21:10:23 -05:00
Geoff Bourne
088bc53010 Auto-merging via docker-versions-create 2021-09-15 20:39:04 -05:00
Geoff Bourne
19c5626085 Auto-merging via docker-versions-create 2021-08-30 21:39:28 -05:00
Geoff Bourne
03cbbd465a Auto-merging via docker-versions-create 2021-08-10 12:57:46 -05:00
Geoff Bourne
592f18358a Auto-merging via docker-versions-create 2021-08-01 12:15:02 -05:00
Geoff Bourne
905906fa6c Auto-merging via docker-versions-create 2021-07-31 09:29:16 -05:00
Geoff Bourne
c862745534 Auto-merging via docker-versions-create 2021-07-26 19:37:13 -05:00
Geoff Bourne
ead8543b48 Merge branch 'master' into java16 2021-07-25 18:21:54 -05:00
Geoff Bourne
d34ae9d57d Auto-merging via docker-versions-create 2021-07-25 09:38:47 -05:00
Geoff Bourne
b6e53249f9 Auto-merging via docker-versions-create 2021-07-23 21:29:14 -05:00
Geoff Bourne
8020f83c3d Auto-merging via docker-versions-create 2021-07-17 21:16:18 -05:00
Geoff Bourne
fe01df78c4 Auto-merging via docker-versions-create 2021-07-17 20:59:03 -05:00
Geoff Bourne
afd0865d33 Auto-merging via docker-versions-create 2021-07-17 18:06:02 -05:00
Geoff Bourne
bcf408fb44 Auto-merging via docker-versions-create 2021-07-14 18:43:28 -05:00
Geoff Bourne
37f59eecd9 Auto-merging via docker-versions-create 2021-07-12 19:11:17 -05:00
Geoff Bourne
4ae2e5592f Auto-merging via docker-versions-create 2021-07-09 20:00:00 -05:00
Geoff Bourne
8fc44e0071 Auto-merging via docker-versions-create 2021-07-08 18:01:28 -05:00
Geoff Bourne
f3fa90b700 Auto-merging via docker-versions-create 2021-07-08 08:05:30 -05:00
itzg
c1322a23ea Auto-merging via docker-versions-create 2021-07-08 12:56:09 +00:00
Geoff Bourne
4cbf481441 Auto-merging via docker-versions-create 2021-07-08 07:40:33 -05:00
itzg
1cd8ec83ef Auto-merging via docker-versions-create 2021-07-04 19:54:08 +00:00
Geoff Bourne
9778bddd4f Auto-merging from master 2021-07-03 14:27:40 -05:00
Geoff Bourne
a03a1a8eff ci: auto-merge from master 2021-07-02 16:03:37 -05:00
itzg
408af32fbe Auto-merging via docker-versions-create 2021-07-02 16:56:04 +00:00
itzg
141d6c7125 Auto-merging via docker-versions-create 2021-06-28 12:14:14 +00:00
itzg
ddd4712ea0 Auto-merging via docker-versions-create 2021-06-27 13:13:19 +00:00
itzg
680987a385 Auto-merging via docker-versions-create 2021-06-24 12:47:13 +00:00
Geoff Bourne
655ae04abb Auto-merging via docker-versions-create 2021-06-23 22:35:33 -05:00
Geoff Bourne
f62dd55300 Auto-merging via docker-versions-create 2021-06-20 12:50:41 -05:00
Geoff Bourne
b5877f6208 Auto-merging via docker-versions-create 2021-06-05 17:54:18 -05:00
Geoff Bourne
d561c026c6 Auto-merging via docker-versions-create 2021-05-24 20:52:34 -05:00
Geoff Bourne
3cd3ca9d88 Merge branch 'master' into java16 2021-05-23 12:27:27 -05:00
Geoff Bourne
b9ef9a46b6 Merge from master 2021-05-22 13:47:15 -05:00
Geoff Bourne
275863f04c Auto-merging via docker-versions-create 2021-05-21 23:03:45 -05:00
Geoff Bourne
ae94a6be3a Auto-merging via docker-versions-create 2021-05-21 22:52:46 -05:00
Geoff Bourne
d08c6e2c46 ci: updated CACHE_NAME 2021-05-21 22:13:59 -05:00
14 changed files with 136 additions and 102 deletions

View File

@@ -24,9 +24,17 @@ body:
attributes:
label: Container definition
description: Please provide the compose file or run command used to create the container
value: |
```
Paste run command or compose file here
```
- type: textarea
id: logs
attributes:
label: Container logs
description: |
Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs.
Please provide container logs from the start of the container, which will be the ones prefixed with `[init]`. It is even better if you can set the variable `DEBUG` to "true" and provide those debug container logs.
value: |
```
Paste logs here
```

7
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
contact_links:
- name: Ask a question in discussions
url: https://github.com/itzg/docker-minecraft-server/discussions
about: Please ask questions here
- name: Ask a question on Discord
url: https://discord.gg/DXfKpjB
about: Please ask questions here

View File

@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
uses: actions/checkout@v2.4.0
- name: Docker meta
id: meta

View File

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
- run: |
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
chmod a+x gh-md-toc

View File

@@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
- name: Run tests
run: |
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
- name: Prepare
id: prep

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
- name: Run tests
run: |

View File

@@ -75,7 +75,6 @@ ENV UID=1000 GID=1000 \
MEMORY="1G" \
TYPE=VANILLA VERSION=LATEST \
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0

View File

@@ -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)
<!-- Added by: runner, at: Fri Nov 5 02:00:06 UTC 2021 -->
<!-- Added by: runner, at: Tue Nov 16 02:46:53 UTC 2021 -->
<!--te-->
@@ -567,8 +567,6 @@ docker run -d -v /path/on/host:/data ... \
-e FABRIC_LOADER_VERSION=0.11.7
```
In order to add mods, you have two options:
### Running a Limbo server
A [Limbo](https://github.com/LOOHP/Limbo) server can be run by setting `TYPE` to `LIMBO`.
@@ -808,6 +806,8 @@ This will reset any manual configuration of the `server.properties` file, so if
In the opposite case, you can skip the startup script's creation of `server.properties`, by setting `SKIP_SERVER_PROPERTIES` to "true".
> NOTE: to clear a server property, set the variable to an empty string, such as `-e RESOURCE_PACK=""`. A variables that maps to a server property that is unset, is ignored and the existing `server.property` is left unchanged.
### Message of the Day
The message of the day, shown below each server entry in the client UI, can be changed with the `MOTD` environment variable, such as
@@ -875,6 +875,7 @@ The server icon which has been set doesn't get overridden by default. It can be
### Rcon
To use rcon use the `ENABLE_RCON` and `RCON_PASSWORD` variables.
The default RCON password is _"minecraft",_ but it's **highly** recommended to override that.
By default rcon port will be `25575` but can easily be changed with the `RCON_PORT` variable.
docker run -d -e ENABLE_RCON=true -e RCON_PASSWORD=testing

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=../start-utils
. ${SCRIPTS:-/}start-utils
# shellcheck source=../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
if isTrue "${DISABLE_HEALTHCHECK}"; then
echo "Healthcheck disabled"
@@ -10,6 +10,6 @@ elif isTrue "${ENABLE_AUTOPAUSE}" && [[ "$( ps -ax -o stat,comm | grep 'java' |
echo "Java process suspended by Autopause function"
exit 0
else
mc-monitor status --host localhost --port $SERVER_PORT
mc-monitor status --host localhost --port "${SERVER_PORT:-25565}"
exit $?
fi

View File

@@ -4,7 +4,7 @@
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
</Console>
<Queue name="ServerGuiConsole">
<Queue name="TerminalConsole">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
</Queue>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
@@ -28,7 +28,7 @@
</filters>
<AppenderRef ref="SysOut"/>
<AppenderRef ref="File"/>
<AppenderRef ref="ServerGuiConsole"/>
<AppenderRef ref="TerminalConsole"/>
</Root>
</Loggers>
</Configuration>

View File

@@ -1,9 +1,15 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
: "${SERVER_PORT:=25565}"
export SERVER_PORT
log "Autopause functionality enabled"
isDebugging && set -x
cp /autopause/knockd-config.cfg /tmp/knockd-config.cfg
# update server port to listen to

View File

@@ -41,6 +41,16 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
fi
fi
if versionLessThan 1.6; then
if ! [[ -L /data/minecraft_server.jar && /data/minecraft_server.jar -ef "/data/$SERVER" ]]; then
rm -f /data/minecraft_server.jar
ln -s "/data/$SERVER" /data/minecraft_server.jar
fi
SERVER=minecraft_server.jar
elif [[ -L /data/minecraft_server.jar ]]; then
rm -f /data/minecraft_server.jar
fi
isDebugging && ls -l
exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

@@ -1,40 +1,46 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
: ${SERVER_PROPERTIES:=/data/server.properties}
: "${SERVER_PROPERTIES:=/data/server.properties}"
# FUNCTIONS
function setServerPropValue {
local prop=$1
local value=$2
# normalize booleans
case ${value^^} in
TRUE|FALSE)
value=${value,,} ;;
esac
if grep "${prop}" "$SERVER_PROPERTIES" > /dev/null; then
log "Setting ${prop} to '${value}' in ${SERVER_PROPERTIES}"
sed -i "/^${prop}\s*=/ c ${prop}=${value//\\/\\\\}" "$SERVER_PROPERTIES"
else
log "Adding ${prop} with '${value}' in ${SERVER_PROPERTIES}"
echo "${prop}=${value}" >> "$SERVER_PROPERTIES"
fi
}
function setServerProp {
local prop=$1
local var=$2
if [ -n "$var" ]; then
# normalize booleans
case ${var^^} in
TRUE|FALSE)
var=${var,,} ;;
esac
if grep "${prop}" "$SERVER_PROPERTIES" > /dev/null; then
log "Setting ${prop} to '${var}' in ${SERVER_PROPERTIES}"
sed -i "/^${prop}\s*=/ c ${prop}=${var//\\/\\\\}" "$SERVER_PROPERTIES"
else
log "Adding ${prop} with '${var}' in ${SERVER_PROPERTIES}"
echo "${prop}=${var}" >> "$SERVER_PROPERTIES"
fi
else
isDebugging && log "Skip setting ${prop}"
local varName=$2
if [ -v $varName ]; then
setServerPropValue "$prop" "${!varName}"
fi
}
function customizeServerProps {
if [ -n "$WHITELIST" ] || isTrue ${ENABLE_WHITELIST:-false}; then
if [ -n "$WHITELIST" ] || isTrue "${ENABLE_WHITELIST:-false}"; then
log "Creating whitelist"
setServerProp "whitelist" "true"
setServerProp "white-list" "true"
setServerPropValue "whitelist" "true"
setServerPropValue "white-list" "true"
else
log "Disabling whitelist"
setServerProp "whitelist" "false"
setServerProp "white-list" "false"
setServerPropValue "whitelist" "false"
setServerPropValue "white-list" "false"
fi
# If not provided, generate a reasonable default message-of-the-day,
@@ -53,57 +59,57 @@ function customizeServerProps {
MOTD="A ${label} Minecraft Server powered by Docker"
fi
setServerProp "server-name" "$SERVER_NAME"
setServerProp "server-ip" "$SERVER_IP"
setServerProp "server-port" "$SERVER_PORT"
setServerProp "motd" "$(echo $MOTD | mc-image-helper asciify)"
setServerProp "allow-nether" "$ALLOW_NETHER"
setServerProp "announce-player-achievements" "$ANNOUNCE_PLAYER_ACHIEVEMENTS"
setServerProp "enable-command-block" "$ENABLE_COMMAND_BLOCK"
setServerProp "spawn-animals" "$SPAWN_ANIMALS"
setServerProp "spawn-monsters" "$SPAWN_MONSTERS"
setServerProp "spawn-npcs" "$SPAWN_NPCS"
setServerProp "spawn-protection" "$SPAWN_PROTECTION"
setServerProp "generate-structures" "$GENERATE_STRUCTURES"
setServerProp "view-distance" "$VIEW_DISTANCE"
setServerProp "hardcore" "$HARDCORE"
setServerProp "snooper-enabled" "$SNOOPER_ENABLED"
setServerProp "max-build-height" "$MAX_BUILD_HEIGHT"
setServerProp "force-gamemode" "$FORCE_GAMEMODE"
setServerProp "max-tick-time" "$MAX_TICK_TIME"
setServerProp "enable-query" "$ENABLE_QUERY"
setServerProp "query.port" "$QUERY_PORT"
setServerProp "enable-rcon" "$ENABLE_RCON"
setServerProp "rcon.password" "$RCON_PASSWORD"
setServerProp "rcon.port" "$RCON_PORT"
setServerProp "max-players" "$MAX_PLAYERS"
setServerProp "max-world-size" "$MAX_WORLD_SIZE"
setServerProp "level-name" "$LEVEL"
setServerProp "level-seed" "$SEED"
setServerProp "pvp" "${PVP}"
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
setServerProp "online-mode" "$ONLINE_MODE"
setServerProp "allow-flight" "$ALLOW_FLIGHT"
setServerProp "level-type" "${LEVEL_TYPE^^}"
setServerProp "resource-pack" "$RESOURCE_PACK"
setServerProp "resource-pack-sha1" "$RESOURCE_PACK_SHA1"
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"
setServerProp "enable-jmx-monitoring" "$ENABLE_JMX"
setServerProp "sync-chunk-writes" "$SYNC_CHUNK_WRITES"
setServerProp "enable-status" "$ENABLE_STATUS"
setServerProp "entity-broadcast-range-percentage" "$ENTITY_BROADCAST_RANGE_PERCENTAGE"
setServerProp "function-permission-level" "$FUNCTION_PERMISSION_LEVEL"
setServerProp "network-compression-threshold" "$NETWORK_COMPRESSION_THRESHOLD"
setServerProp "op-permission-level" "$OP_PERMISSION_LEVEL"
setServerProp "prevent-proxy-connections" "$PREVENT_PROXY_CONNECTIONS"
setServerProp "use-native-transport" "$USE_NATIVE_TRANSPORT"
setServerProp "enforce-whitelist" "$ENFORCE_WHITELIST"
setServerProp "simulation-distance" "$SIMULATION_DISTANCE"
setServerProp "server-name" SERVER_NAME
setServerProp "server-ip" SERVER_IP
setServerProp "server-port" SERVER_PORT
setServerProp "allow-nether" ALLOW_NETHER
setServerProp "announce-player-achievements" ANNOUNCE_PLAYER_ACHIEVEMENTS
setServerProp "enable-command-block" ENABLE_COMMAND_BLOCK
setServerProp "spawn-animals" SPAWN_ANIMALS
setServerProp "spawn-monsters" SPAWN_MONSTERS
setServerProp "spawn-npcs" SPAWN_NPCS
setServerProp "spawn-protection" SPAWN_PROTECTION
setServerProp "generate-structures" GENERATE_STRUCTURES
setServerProp "view-distance" VIEW_DISTANCE
setServerProp "hardcore" HARDCORE
setServerProp "snooper-enabled" SNOOPER_ENABLED
setServerProp "max-build-height" MAX_BUILD_HEIGHT
setServerProp "force-gamemode" FORCE_GAMEMODE
setServerProp "max-tick-time" MAX_TICK_TIME
setServerProp "enable-query" ENABLE_QUERY
setServerProp "query.port" QUERY_PORT
setServerProp "enable-rcon" ENABLE_RCON
setServerProp "rcon.password" RCON_PASSWORD
setServerProp "rcon.port" RCON_PORT
setServerProp "max-players" MAX_PLAYERS
setServerProp "max-world-size" MAX_WORLD_SIZE
setServerProp "level-name" LEVEL
setServerProp "level-seed" SEED
setServerProp "pvp" PVP
setServerProp "generator-settings" GENERATOR_SETTINGS
setServerProp "online-mode" ONLINE_MODE
setServerProp "allow-flight" ALLOW_FLIGHT
setServerProp "resource-pack" RESOURCE_PACK
setServerProp "resource-pack-sha1" RESOURCE_PACK_SHA1
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
setServerProp "enable-jmx-monitoring" ENABLE_JMX
setServerProp "sync-chunk-writes" SYNC_CHUNK_WRITES
setServerProp "enable-status" ENABLE_STATUS
setServerProp "entity-broadcast-range-percentage" ENTITY_BROADCAST_RANGE_PERCENTAGE
setServerProp "function-permission-level" FUNCTION_PERMISSION_LEVEL
setServerProp "network-compression-threshold" NETWORK_COMPRESSION_THRESHOLD
setServerProp "op-permission-level" OP_PERMISSION_LEVEL
setServerProp "prevent-proxy-connections" PREVENT_PROXY_CONNECTIONS
setServerProp "use-native-transport" USE_NATIVE_TRANSPORT
setServerProp "enforce-whitelist" ENFORCE_WHITELIST
setServerProp "simulation-distance" SIMULATION_DISTANCE
setServerPropValue "motd" "$(echo "$MOTD" | mc-image-helper asciify)"
[[ $LEVEL_TYPE ]] && setServerPropValue "level-type" "${LEVEL_TYPE^^}"
if [ -n "$DIFFICULTY" ]; then
case $DIFFICULTY in
case ${DIFFICULTY,,} in
peaceful|0)
if versionLessThan 1.13; then
DIFFICULTY=0
@@ -137,13 +143,12 @@ function customizeServerProps {
exit 1
;;
esac
setServerProp "difficulty" "$DIFFICULTY"
setServerPropValue "difficulty" "$DIFFICULTY"
fi
if [ -n "$MODE" ]; then
log "Setting mode"
MODE_LC=$( echo $MODE | tr '[:upper:]' '[:lower:]' )
case $MODE_LC in
case ${MODE,,} in
su*|0)
if versionLessThan 1.13; then
MODE=0
@@ -177,7 +182,7 @@ function customizeServerProps {
exit 1
;;
esac
setServerProp "gamemode" "$MODE"
setServerPropValue "gamemode" "$MODE"
fi
}
@@ -210,16 +215,16 @@ fi
if isTrue "${ENABLE_AUTOPAUSE}"; then
current_max_tick=$( grep 'max-tick-time' "$SERVER_PROPERTIES" | sed -r 's/( )+//g' | awk -F= '{print $2}' )
if (( $current_max_tick > 0 && $current_max_tick < 86400000 )); then
if (( current_max_tick > 0 && current_max_tick < 86400000 )); then
log "Warning: The server.properties for the server doesn't have the Server Watchdog (effectively) disabled."
log "Warning (cont): Autopause functionality resuming the process might trigger the Watchdog and restart the server completely."
log "Warning (cont): Set the max-tick-time property to a high value (or disable the Watchdog with value -1 for versions 1.8.1+)."
fi
fi
if isDebugging; then
if isDebugging && [ -f "${SERVER_PROPERTIES}" ]; then
log "DEBUG Dumping server.properties"
cat "${SERVER_PROPERTIES}"
fi
exec ${SCRIPTS:-/}start-setupEnvVariables $@
exec "${SCRIPTS:-/}start-setupEnvVariables" "$@"

View File

@@ -1,16 +1,14 @@
#!/bin/bash
. ${SCRIPTS:-/}start-utils
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
set -e
isDebugging && set -x
: ${LEVEL:=world}
export LEVEL
if [ $TYPE = "CURSEFORGE" ]; then
worldDest=$FTB_DIR/$LEVEL
worldDest=$FTB_DIR/${LEVEL:-world}
else
worldDest=/data/$LEVEL
worldDest=/data/${LEVEL:-world}
fi
if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); then
@@ -71,4 +69,4 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
fi
fi
exec ${SCRIPTS:-/}start-setupModpack $@
exec "${SCRIPTS:-/}start-setupModpack" "$@"