GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.88k stars 270 forks source link

Changed port validator to allow all valid ports #1127

Closed matthi4s closed 2 years ago

matthi4s commented 2 years ago

(Same as #1126 but for the 1.12 branch)

Currently, only ports below 49152 are accepted, otherwise, Glowstone falls back to 25565. This produces this warning:

20:08:46 [WARNING] Invalid config value for 'server.port' (54224), resetting to default (25565)

While the ports 49152 to 65535 are considered private/dynamic ports and probably aren't ideal to use under many circumstances, they are still valid ports and should be accepted by Glowstone.

At Aternos, we use a large port range including that private range to reduce the chance of conflicting ports while trying to keep the server port consistent for the user.