ferrumc-rs / ferrumc

A reimplementation of the minecraft server in rust.
MIT License
1.04k stars 31 forks source link

Reload config on change #114

Open Sweattypalms opened 2 weeks ago

Sweattypalms commented 2 weeks ago

Instead of loading once at startup, make it so it automatically reloads the static variable when the file changes. Perhaps with file watcher or something?

0xnim commented 2 weeks ago

Maybe not dynamically but with a /reload

Skullians commented 2 weeks ago

When we get a command api that's a possibility but bearing in mind not a lot of the reloaded configs will apply until restart sure, motd but not much else

0xnim commented 2 weeks ago

online-mode should not be able to change

Sweattypalms commented 2 weeks ago

wouldn't a file watcher be convenient?

0xnim commented 2 weeks ago

Default config values would be overwritten by api anyways. So watcher would create conflicts

GStudiosX2 commented 2 weeks ago

I don't see a use for this there's not many options in the config that can actually be reloaded

0xnim commented 2 weeks ago

close this issue?

GStudiosX2 commented 2 weeks ago

close this issue?

I mean once ferrumc gets bigger and there's more configuration stuff perhaps this could be something.

I think most would rarely change the config after they set it up how they like it the server starts up fast anyways 🤷