register

fun <K : Setting<*>> register(setting: K): K

Registers the setting to this Module. This will make the setting appear in the GUI and save to the config. The following is an example of how it can be used to define a setting for a module.

private val distance = register(NumberSetting("Distance", 4.0, 1.0,10.0,0.1))