Effective Config
Base class for a plugin's YAML config.
A subclass names its owning plugin (getInstance) and file (getFileName). init copies the bundled default resource on first run and loads it; call it once before reading any values (from onLoad or onEnable — both work, since dataFolder/saveResource are available by then). Typed getters wrap FileConfiguration, and set writes through to disk immediately.
object ExampleConfig : EffectiveConfig() {
override fun getInstance() = ExamplePlugin.instance
override fun getFileName() = "config.yml"
fun getSpawnRadius() = getInt("spawn-radius", 10)
}Properties
Functions
Boolean list at path (empty if absent).
Configuration section at path, or null if absent.
Double list at path (empty if absent).
Config file name inside the plugin's data folder, e.g. "config.yml".
The plugin that owns this config (used for data folder and bundled resource).
Int list at path (empty if absent).
Long list at path (empty if absent).
String list at path (empty if absent).