vatertime / minecraft-spot-pricing

Cloudformation template to deploy a Minecraft server
MIT License
141 stars 85 forks source link

Made MaxPlayers and ViewDistance default to -1 and ignore when not changed #15

Closed javabrett closed 2 years ago

javabrett commented 2 years ago

See #14 . My research suggests that there isn't a perfect, no-default-in-template, ignore-when-not-set solution for CloudFormation Integer types.

Two possible fixes:

Template looks a little strange on-render, as text says the defaults for these are 20/10, which they are when-absent in the launched image, and the env will be absent if these are left as -1 per the template default, it's just a little odd-looking, but works.

With this change you can again click-through template to launch, without being forced to fill-in the defaults for these two parameters, which avoids setting the env for them in the container-launch, which also avoids missing a change in defaults there.

Fixes #14.