net.minecraftforge.common.config.Configuration.hasKey()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(169)

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

Configuration.hasKey介绍

暂无

代码示例

代码示例来源:origin: CoFH/CoFHCore

public boolean hasKey(String category, String key) {
  return modConfiguration.hasKey(category, key);
}

代码示例来源:origin: CoFH/CoFHCore

public boolean removeProperty(String category, String key) {
  if (!modConfiguration.hasKey(category, key)) {
    return false;
  }
  modConfiguration.getCategory(category).remove(key);
  return true;
}

代码示例来源:origin: SleepyTrousers/EnderIO

@Override
public Object readResolve() throws InvalidRecipeConfigException {
 if (section == null) {
  throw new InvalidRecipeConfigException("Missing section");
 }
 section = section.toLowerCase(Locale.US);
 if (name == null) {
  throw new InvalidRecipeConfigException("Missing name");
 }
 if (!EnderIO.getInstance().getConfiguration().hasKey(section, name)) {
  throw new InvalidRecipeConfigException("Unknown config value '" + section + ":" + name + "'");
 }
 return this;
}

代码示例来源:origin: Vazkii/Quark

key = key.substring(2);
if(config.hasKey(fullCategory, key)) {
  boolean changed = false;

代码示例来源:origin: McJtyMods/LostCities

if (cfg.hasKey(CATEGORY_GENERAL, "version")) {
  oldVersion = cfg.getInt("version", CATEGORY_GENERAL, VERSION, 0, 10000, "Config version. Do not modify this manually!");

代码示例来源:origin: CoFH/CoFHCore

public boolean copyProperty(String category, String key, String newCategory, String newKey, boolean forceValue) {
  if (modConfiguration.hasKey(category, key)) {
    Property prop = modConfiguration.getCategory(category).get(key);

代码示例来源:origin: CoFH/CoFHCore

public boolean renameProperty(String category, String key, String newCategory, String newKey, boolean forceValue) {
  if (modConfiguration.hasKey(category, key)) {
    Property prop = modConfiguration.getCategory(category).get(key);

代码示例来源:origin: RS485/LogisticsPipes

.getBoolean(false);
if(Configs.CONFIGURATION.hasKey(Configs.CATEGORY_MULTITHREAD, "enabled")) {

代码示例来源:origin: Electrical-Age/ElectricalAge

if (config.hasKey("lamp", "incondescentLifeInHours"))
  config.renameProperty("lamp", "incondescentLifeInHours", "incandescentLifeInHours");
if (config.hasKey("mapgenerate", "plumb"))
  config.renameProperty("mapgenerate", "plumb", "lead");
if (config.hasKey("mapgenerate", "cooper"))
  config.renameProperty("mapgenerate", "cooper", "copper");
if (config.hasKey("simulation", "electricalFrequancy"))
  config.renameProperty("simulation", "electricalFrequancy", "electricalFrequency");
if (config.hasKey("simulation", "thermalFrequancy"))
  config.renameProperty("simulation", "thermalFrequancy", "thermalFrequency");

相关文章