gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 05:14:49 25 4
gpt4 key购买 nike

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

YAMLProcessor.<init>介绍

暂无

代码示例

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

private void loadConfig() {
  createDefaultConfiguration("config.yml"); // Create the default configuration file
  config = new BukkitConfiguration(new YAMLProcessor(new File(getDataFolder(), "config.yml"), true), this);
  config.load();
}

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

config = new YAMLProcessor(file, false, YAMLFormat.EXTENDED);
try {
  config.load();

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

/**
 * Create a YAML processer instance.
 *
 * @param file the file
 * @return a processor instance
 */
private YAMLProcessor createYamlProcessor(File file) {
  checkNotNull(file);
  return new YAMLProcessor(file, false, YAMLFormat.COMPACT);
}

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

@Override
  public ConfigurationFile createConfigurationNode(File file) {
    return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));
  }
});

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

@Override
  public ConfigurationFile createConfigurationNode(File file) {
    return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));
  }
});

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

@Override
  public ConfigurationFile createConfigurationNode(File file) {
    return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));
  }
});

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

public WrappedSpawnManager(File configFile) {
  configFile.getParentFile().mkdirs();
  if (!configFile.exists())
    try {
      configFile.createNewFile();
    } catch (IOException e) {
      CommandBook.logger().log(Level.SEVERE, "CommandBook: Spawn storage file creation error: {0}", e.getMessage());
    }
  config = new YAMLProcessor(configFile, true, YAMLFormat.COMPACT);
  load();
}

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

@Override
public void enable() {
  config = configure(new LocalConfiguration());
  File helpFile = new File(CommandBook.inst().getDataFolder(), config.helpFile);
  if (!helpFile.getParentFile().exists() || !helpFile.getParentFile().isDirectory())
    helpFile.getParentFile().mkdirs();
  if (!helpFile.exists() || !helpFile.isFile()) try {
    helpFile.createNewFile();
  } catch (IOException ignored) {}
  help = new YAMLProcessor(helpFile, true, YAMLFormat.EXTENDED);
  reloadMessages();
  registerCommands(HelpCommands.class);
}

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

/**
 * Construct the object.
 *
 * @param plugin The WorldGuardPlugin instance
 * @param worldName The world name that this BukkitWorldConfiguration is for.
 * @param parentConfig The parent configuration to read defaults from
 */
public BukkitWorldConfiguration(WorldGuardPlugin plugin, String worldName, YAMLProcessor parentConfig) {
  File baseFolder = new File(plugin.getDataFolder(), "worlds/" + worldName);
  File configFile = new File(baseFolder, "config.yml");
  blacklistFile = new File(baseFolder, "blacklist.txt");
  this.plugin = plugin;
  this.worldName = worldName;
  this.parentConfig = parentConfig;
  plugin.createDefaultConfiguration(configFile, "config_world.yml");
  plugin.createDefaultConfiguration(blacklistFile, "blacklist.txt");
  config = new YAMLProcessor(configFile, true, YAMLFormat.EXTENDED);
  loadConfiguration();
  if (summaryOnStart) {
    log.info("Loaded configuration for world '" + worldName + "'");
  }
}

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

processor = new YAMLProcessor(userFile, false, YAMLFormat.COMPACT);
try {
  processor.load();

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

/**
 * Loads the configuration.
 */
@Override
public YAMLProcessor createConfiguration() {
  final File configFile = new File(getDataFolder(), "config.yml");
  YAMLProcessor config = new YAMLProcessor(configFile, true, YAMLFormat.EXTENDED);
  YAMLProcessor comments = new DefaultsFileYAMLProcessor("config-comments.yml", false);
  try {
    if (!configFile.exists()) {
      configFile.getParentFile().mkdirs();
      configFile.createNewFile();
    }
    config.load();
    comments.load();
  } catch (Exception e) {
    getLogger().log(Level.WARNING, "Error loading configuration: ", e);
  }
  for (Map.Entry<String, Object> e : comments.getMap().entrySet()) {
    if (e.getValue() != null) {
      config.setComment(e.getKey(), e.getValue().toString());
    }
  }
  // Migrate the old configuration, if we need to
  final String result = new LegacyCommandBookConfigurationMigrator(configFile, config).migrate();
  if (result != null) {
    logger().severe("Error migrating CommandBook configuration: " + result);
  }
  return config;
}

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

@Override
public ConfigurationFile createConfigurationNode(File file) {
  return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));
  @Override
  public ConfigurationFile createConfigurationNode(File file) {
    return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));
  @Override
  public ConfigurationFile createConfigurationNode(File file) {
    return new YAMLProcessorConfigurationFile(new YAMLProcessor(file, true, YAMLFormat.EXTENDED));

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

copyDefaults();
config = new YAMLProcessor(new File(getDataFolder(), "config.yml"), true, YAMLFormat.EXTENDED);
try {
  config.load();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com