minekube / gate

High-Performance, Low-Memory, Lightweight, Extensible Minecraft Reverse Proxy with Excellent Multi-Protocol Version Support - Velocity/Bungee Replacement - Ready for dev and large deploy!
https://gate.minekube.com
Apache License 2.0
584 stars 50 forks source link

Fix default Config marshaling weirdly #327

Closed Merith-TK closed 2 months ago

Merith-TK commented 2 months ago

Basically the config took a string input on the file, but the internal had a different type, which meant when you "wrote" the config file, it would write the entire byte array of that other type.

I modified the text(str) function to instead be an global function to be used in the exactly two places that needed it. rather than on the global config struct

How you can test is just make a plugin that writes the config file from the same default data struct.

This also allows for Plugins to "alter" that part of the config.