com.sk89q.util.yaml.YAMLProcessor.getKeys()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中com.sk89q.util.yaml.YAMLProcessor.getKeys()方法的一些代码示例,展示了YAMLProcessor.getKeys()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLProcessor.getKeys()方法的具体详情如下:
包路径:com.sk89q.util.yaml.YAMLProcessor
类名称:YAMLProcessor
方法名:getKeys

YAMLProcessor.getKeys介绍

暂无

代码示例

代码示例来源:origin: EngineHub/WorldEdit

logger.log(Level.WARNING, "Error loading WEPIF configuration", e);
List<String> keys = config.getKeys(null);
config.setHeader(CONFIG_HEADER);

代码示例来源:origin: EngineHub/WorldGuard

public List<String> getKeys(String node) {
  List<String> res = parentConfig.getKeys(node);
  if (res == null || res.size() == 0) {
    res = config.getKeys(node);
  }
  if (res == null) {
    res = new ArrayList<String>();
  }
  return res;
}

代码示例来源:origin: EngineHub/CommandBook

private boolean reloadMessages() {
  try {
    help.load();
  } catch (IOException e) {
    return false;
  }
  List<String> keys = help.getKeys("topics");
  if (keys == null) {
    help.setProperty("topics.help", demoHelpMessage);
    keys = new ArrayList<String>();
    keys.add("help");
    help.save();
  }
  for (String key : keys) {
    String information = help.getString("topics." + key);
    if (information != null && information.trim().length() != 0) {
      information = replaceColorMacros(information);
      String[] split = information.split("\\n");
      for (int i = 0; i < split.length; i++) {
        split[i] = split[i].replaceAll("[\\r\\n]", "");
      }
      messages.put(key.toLowerCase(), split);
    }
  }
  return true;
}

相关文章