registerAndLoadNoGuiConfig

fun <T : Config> registerAndLoadNoGuiConfig(configClass: Supplier<T>, registerType: RegisterType = RegisterType.CLIENT): T

Creates and registers a Config. Use this over registerConfig and readOrCreateAndValidate if possible.

Performs the entire creation, loading, validation, and registration process on a config class. Internally performs the two steps

  1. readOrCreateAndValidate

  2. registerConfig

This method avoids registering a GUI. Use this if you want to implement your own GUI.

Return

loaded, validated, and registered instance of T

Author

fzzyhmstrs

Since

0.6.5

Parameters

T

the config type, any subclass of Config

configClass

Supplier of config class instances

registerType

RegisterType, default RegisterType.CLIENT. Where to register the config. RegisterType.SERVER doesn't make much sense here.