ConfigJS - Creating Configurations via KubeJS
This mod opens up new possibilities for creating custom configuration files in TOML format using KubeJS scripts for the Forge platform. Detailed instructions and usage examples are available in the project's wiki.
Let's consider a practical example of creating a common configuration:
ConfigsEvent.common(event => {
event.setName('My Very Cool Config File')
event.push('debug')
event.comment('Determines the number of particles spawned around the player in debug mode')
global.debugParticleCount = event.intValue('numberOfParticles', 0, 0, 20)
event.comment('Determines if debug mode is enabled')
global.debugEnabled = event.booleanValue('enabled', false)
event.pop()
event.comment('Be creative!')
global.selector = event.enumValue('selectorType', 'basic', ['basic', 'advanced', 'supreme'])
})