wrapConfig
fun wrapConfig(plugin: Plugin, logger: Logger = Logger.getLogger("io.github.kraftlin.config")): AbstractConfig.ConfigWrapper
Wraps the default plugin config config.yml for use in AbstractConfig. This is the recommended approach when using a single configuration file only.
Parameters
plugin
The plugin instance to which the config belongs.
logger
Logger for warnings about invalid configuration values.
Throws
if the file cannot be read (not UTF-8, no permission), contains invalid YAML or an alias that includes itself
Deprecated
Use io.github.kraftlin.config.wrapConfig(Path) instead.
Replace with
import io.github.kraftlin.config.wrapConfig
Content copied to clipboard
io.github.kraftlin.config.wrapConfig(configPath)Content copied to clipboard
Wraps an arbitrary YAML file for use in AbstractConfig. This way, a plugin can support multiple configurations.
Throws
if the file cannot be read (not UTF-8, no permission), contains invalid YAML or an alias that includes itself