本文整理了Java中com.sk89q.util.yaml.YAMLProcessor.setProperty()
方法的一些代码示例,展示了YAMLProcessor.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YAMLProcessor.setProperty()
方法的具体详情如下:
包路径:com.sk89q.util.yaml.YAMLProcessor
类名称:YAMLProcessor
方法名:setProperty
暂无
代码示例来源:origin: EngineHub/WorldEdit
config.setProperty("ignore-nijiperms-bridges", true);
isUpdated = true;
config.setProperty("resolvers.enabled", resolvers);
isUpdated = true;
} else {
config.setProperty("resolvers.disabled", disabledResolvers);
config.setProperty("resolvers.enabled", stagedEnabled);
代码示例来源:origin: EngineHub/WorldGuard
@Override
public void disableUuidMigration() {
config.setProperty("regions.uuid-migration.perform-on-next-start", false);
if (!config.save()) {
log.severe("Error saving configuration!");
}
}
}
代码示例来源:origin: EngineHub/WorldGuard
public List<String> getStringList(String node, List<String> def) {
List<String> res = parentConfig.getStringList(node, def);
if (res == null || res.size() == 0) {
parentConfig.setProperty(node, new ArrayList<String>());
}
if (config.getProperty(node) != null) {
res = config.getStringList(node, def);
}
return res;
}
代码示例来源:origin: EngineHub/WorldGuard
public List<Integer> getIntList(String node, List<Integer> def) {
List<Integer> res = parentConfig.getIntList(node, def);
if (res == null || res.size() == 0) {
parentConfig.setProperty(node, new ArrayList<Integer>());
}
if (config.getProperty(node) != null) {
res = config.getIntList(node, def);
}
return res;
}
代码示例来源:origin: EngineHub/WorldGuard
private TargetMatcherSet getTargetMatchers(String node) {
TargetMatcherSet set = new TargetMatcherSet();
List<String> inputs = parentConfig.getStringList(node, null);
if (inputs == null || inputs.size() == 0) {
parentConfig.setProperty(node, new ArrayList<String>());
return set;
}
for (String input : inputs) {
try {
set.add(matcherParser.fromInput(input));
} catch (TargetMatcherParseException e) {
log.warning("Failed to parse the block / item type specified as '" + input + "'");
}
}
return set;
}
代码示例来源: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;
}
代码示例来源:origin: EngineHub/WorldGuard
Object hostKeysRaw = config.getProperty("host-keys");
if (!(hostKeysRaw instanceof Map)) {
config.setProperty("host-keys", new HashMap<String, String>());
} else {
for (Map.Entry<Object, Object> entry : ((Map<Object, Object>) hostKeysRaw).entrySet()) {
代码示例来源:origin: EngineHub/CommandBook
public WrappedSpawn setWorldSpawn(Location loc) {
WrappedSpawn spawn = getEnrichment(loc.getWorld());
loc.getWorld().setSpawnLocation(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
spawn.setPitch(loc.getPitch());
spawn.setYaw(loc.getYaw());
config.setProperty(spawn.getWorldName() + ".pitch", spawn.getPitch());
config.setProperty(spawn.getWorldName() + ".yaw", spawn.getYaw());
config.setHeader(CONFIG_HEADER);
config.save();
return spawn;
}
内容来源于网络,如有侵权,请联系作者删除!