itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.19k stars 224 forks source link

Sever Property file generation seems to be incorrectly escaping special characters #437

Open alexchomiak opened 4 months ago

alexchomiak commented 4 months ago

When configuring my docker-compose configuration with the following environment property:

LEVEL_TYPE: 'gardenofglass:gardenofglass.'

The generated server.properties file sets the level-type value as follows: level-type=gardenofglass\:gardenofglass.

It seems to be escaping the semicolon, but not removing the forward slash /.

This is causing world generation to behave incorrectly. Trying to manually correct the value just has this overwritten with the correct one. (even if omitting the environment variable)

itzg commented 4 months ago

That is standard java properties file behavior:

https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html#store(java.io.Writer,java.lang.String)

Minecraft wiki also states that colon must be escaped:

https://minecraft.wiki/w/Server.properties#level-type

itzg commented 4 months ago

Are you sure that trailing period isn't the problem?

image