Free library
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
// shade it into your plugin:
implementation 'com.github.IgnitedStudiosFire:SimpleJSONConfig:1.4.3'
// or put the jar in plugins/ to share configs between plugins:
// compileOnly 'com.github.IgnitedStudiosFire:SimpleJSONConfig:1.4.3'
}SimpleJSONConfig at a glance
From its README, plugin descriptor, build file and licence.
What SimpleJSONConfig does
- 01A class annotated @Configuration and extending Config becomes a config file
- 02Data stores: a class annotated @Stored and implementing Identifiable is saved to flat files through a Service
- 03@Comment writes a comment into the config file
- 04@Autowired fills a static field with the loaded config
- 05Serialises ItemStack, Location, World, Block and more, plus interfaces and superclasses
- 06SharedGsonBuilder shares type adapters between plugins
- 07An LRU cache in front of the data stores
- 08Config files gain new fields and lose removed ones when the class changes
- 09Reload one config or all of them
- Register it in onEnable with SimpleJSONConfig.INSTANCE.register(this), or register(this, StoreType.YAML) for YAML. The default folder is YourPlugin/configuration/.
- Final fields are not supported yet, and a transient field is left out of the file.
Other free plugins
All public, all with source.