📅  最后修改于: 2022-03-11 14:52:20.288000             🧑  作者: Mango
// Load config
Configuration config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
// Sets a string
config.set('test', 'This is a test');
// Loads a string
config.getString('test'); // test
// Save config
ConfigurationProvider.getProvider(YamlConfiguration.class).save(config, new File(getDataFolder(), "config.yml"));