XDPXI's Documentation
Config

Loading Configs

import dev.xdpxi.xdlib.api.v7.config.ConfigManager;

Loading a Config

Load a config using:

MyModConfig cfg = ConfigManager.load(MyModConfig.class);

If the config file does not exist, it will automatically be created with the default values.

For example:

config/mymod.yml

Reading Values

Values can be accessed directly from the fields.

System.out.println(cfg.toggleA);

System.out.println(cfg.toggleB);

System.out.println(cfg.stringA);

System.out.println(cfg.stringB);

System.out.println(cfg.integerA);

Example output:

true
false

this is default stuff
41