Package-level declarations

Types

Link copied to clipboard
class ConfigHandle<T : Any>(file: File, clazz: KClass<T>)

Handles the loading and reloading of a configuration file into an instance of type T.

Link copied to clipboard

Configurable reader for files, plugin configuration files, and layered sections.

Link copied to clipboard
object Configs

Utility for loading and managing configurations.

Link copied to clipboard

An ordered collection of configuration sections.

Functions

Link copied to clipboard
inline fun <T : Any> ConfigurationSection.convert(): T

Converts this ConfigurationSection to an instance of type T.

Link copied to clipboard
inline fun <T : Any> ConfigurationSection.get(key: String): T?

Gets the configuration section at the specified key and converts it to type T.

inline operator fun <T : Any> ConfigurationSection.get(key: String, runner: T.() -> Unit): T?

Gets the configuration section at the specified key, converts it to type T, and executes the runner on it.

Link copied to clipboard
inline fun <C : Any> Plugin.getConfigInstance(): C

Loads and returns the plugin's configuration as an instance of type C.

Link copied to clipboard
inline fun <T : Any> ConfigurationSection.getOrDefault(key: String, default: T): T

Gets the configuration section at the specified key and converts it to type T, or returns default if not found.