GlowstoneMC / Glowstone

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

Add config value validation #807

Closed aramperes closed 6 years ago

aramperes commented 6 years ago

Currently, our configuration file (glowstone.yml) is being read using the ServerConfig class. There are a few fields that may require a certain value range, and I think it would be preferable to warn the user on startup instead of having if-statements all around the code.

Some fields that may need validation include:

I suggest we add some sort of Validator system to abstract this