📜  bungeecord 插件添加配置 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:20.288000             🧑  作者: Mango

代码示例1
// 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"));