本文整理汇总了Java中net.cubespace.Yamler.Config.Config类的典型用法代码示例。如果您正苦于以下问题:Java Config类的具体用法?Java Config怎么用?Java Config使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Config类属于net.cubespace.Yamler.Config包,在下文中一共展示了Config类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initConfig
import net.cubespace.Yamler.Config.Config; //导入依赖的package包/类
/**
* Init a new Config and store it inside the Manager
*
* @param name The name which should be used to store the Config to
* @param config The config which should be inited and stored
*/
public void initConfig(String name, Config config) {
System.out.println("Attempting to load new Config '" + name + "'");
try {
config.init();
config.save();
configHashMap.put(name, config);
} catch (InvalidConfigurationException e) {
throw new RuntimeException(e);
}
}
示例2: getConfig
import net.cubespace.Yamler.Config.Config; //导入依赖的package包/类
/**
* Gets the Config stored under the name
*
* @param name the name
* @return the config
*/
public Config getConfig(String name) {
plugin.getLogger().info("Getting Config for " + name + ": " + configHashMap.get(name).toString());
return configHashMap.get(name);
}