ClassMapper

Utility for mapping configuration sections to Kotlin classes.

This singleton provides methods to instantiate Kotlin classes from Bukkit's ConfigurationSection and to write object properties back to a section.

Functions

Link copied to clipboard
fun <T : Any> create(clazz: KClass<T>, section: ConfigurationSection): T

Creates an instance of type T from the section.

Link copied to clipboard
fun write(obj: Any, section: ConfigurationSection)

Writes the properties of the obj back to the section.