1// Load config
2Configuration config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
3
4// Sets a string
5config.set('test', 'This is a test');
6// Loads a string
7config.getString('test'); // test
8
9// Save config
10ConfigurationProvider.getProvider(YamlConfiguration.class).save(config, new File(getDataFolder(), "config.yml"));