-
Notifications
You must be signed in to change notification settings - Fork 3
Configs
Mr Zombii edited this page Mar 24, 2024
·
4 revisions
BasicConfig.Builder configBuilder BasicConfig.makeIfNotExists("anyConfig");
configBuilder.addOption("testOption1", "Hello I'm A Config Value :)");
BasicConfig cfg = configBuilder.build();
cfg.getValue("testOption1", "Default Config Value :)");
To create a config you would call the BasicConfig.makeifNotExists
method and supply it with the name of choice for your config.
To add options to the config file you do .addOption
to your config builder to add a key and a value that can be a Number, String, Or Boolean.
To build your config and use it you can now call .build()
and .getValue
can be used to get your option you set in the config. With .getValue
you need to pass the key for the option and the default value if getting the key fails.