EncryptSL / LiteEco

Minecraft Economy Plugin works with vault.
26 stars 9 forks source link

[Feature]: Config version || Broken config #29

Open LcyDev opened 1 year ago

LcyDev commented 1 year ago

Type of function to add or improvement

Others

Your ideas

If the config is broken (Caused by an update for example) Then, rename config.yml to old_config.yml and save a new config.yml

This could also be done to messages

What do you think?

EncryptSL commented 1 year ago

My idea now is add into config version: 1.0.0 and if config is changed by new release, rename old config and generate new or generate into config new values.

This "config broken" mean editing by user ? Or in released plugin ?

LcyDev commented 1 year ago

This "config broken" mean editing by user ? Or in released plugin ?

Basically if the plugin can't load the config, no matter the reason it will rename it to old_config and save a new config.

It should also say warn in the console that this happened and maybe disable itself

EncryptSL commented 1 year ago

Basically this commit d87a0bb implement version for config.yml, but if this is a great stuff i don't know, maybe can be implemented to stacktrace and do stuff in catch if config is malformated.

LcyDev commented 1 year ago

I see, it's fine for now but I will probably make something soom

LcyDev commented 3 weeks ago

I'm thinking of making a new implementation for the config soon.

EncryptSL commented 3 weeks ago

Okay

LcyDev commented 3 weeks ago

Check out this library: https://github.com/Exlll/ConfigLib

LcyDev commented 3 weeks ago

Or, https://github.com/dejvokep/boosted-yaml

EncryptSL commented 3 weeks ago

Boosted-yaml seems fine.