Addd Config global for creating custom configs that ends with .yml
Global Config Object in Java Runtime
Config object has a save function.
const defaultConfig = Config.save('config')
const dataConfig = Config.save('data')
- In save function you need to pass how the config file should be called.
- save function returns FileManager Object
Help
I have a request to add something to @customrealms/cli so this feature would work purfectly. Add something like configs argument.
{
"name": "example-plugin",
"version": "1.0.0",
"description": "",
"configs": {
"config": "./configs/config.yml",
"messages": "./configs/messages.yml",
"data": "./configs/data.yml"
}
}
We need it so we could create configs and could add default creata form, it should be stored where plugin.yml is stored. Otherwise it will just not work!
For your cli suggestion, I think it would be beneficial to do something like that for future options too, so we should do something like
{
"name": "example-plugin",
"version": "1.0.0",
"description": "",
"customrealms": {
"includes": {
"/": ["./configs/*.yml"]
}
}
}
The nesting under "customrealms" is per the CommonJS standard and to not conflict with other packages or future features. And, it's just my initial thought, but having an includes property with a map of dirs relative to the root of the jar to include files into using globs. If that makes sense