Program: 33928
Project: 33928
Buggy source:
/** 
 * Loads the various settings from the config.yml file into the plugin
 */
@SuppressWarnings("String_Node_Str") public boolean loadPluginConfig(){
  try {
    getConfig();
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
  FileLister fl=new FileLister(this);
  try {
    availableLocales.put("String_Node_Str",new ASLocale(this,"String_Node_Str",0));
    int index=1;
    for (    String code : fl.list()) {
      if (!code.equals("String_Node_Str")) {
        if (code.length() == 5 && code.charAt(2) == '-') {
          availableLocales.put(code,new ASLocale(this,code,index++));
        }
 else {
          getLogger().severe(code + "String_Node_Str");
        }
      }
    }
  }
 catch (  IOException e1) {
    getLogger().severe("String_Node_Str");
  }
  String configVersion=getConfig().getString("String_Node_Str","String_Node_Str");
  if (configVersion.split("String_Node_Str").length == 4) {
    configVersion=configVersion.substring(0,configVersion.lastIndexOf('.'));
  }
  String version=plugin.getDescription().getVersion();
  if (version.split("String_Node_Str").length == 4) {
    version=version.substring(0,version.lastIndexOf('.'));
  }
  if (configVersion.isEmpty() || !configVersion.equalsIgnoreCase(version)) {
    File newConfig=new File(plugin.getDataFolder(),"String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str" + configVersion + "String_Node_Str");
    getLogger().warning("String_Node_Str" + version + "String_Node_Str");
    getLogger().warning("String_Node_Str");
    if (!newConfig.exists()) {
      File oldConfig=new File(plugin.getDataFolder(),"String_Node_Str");
      File bakConfig=new File(plugin.getDataFolder(),"String_Node_Str");
      if (oldConfig.renameTo(bakConfig)) {
        plugin.saveResource("String_Node_Str",false);
        oldConfig.renameTo(newConfig);
        bakConfig.renameTo(oldConfig);
      }
    }
  }
  Settings.recoverSuperFlat=getConfig().getBoolean("String_Node_Str");
  if (Settings.recoverSuperFlat) {
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
  }
  Settings.helmetProtection=getConfig().getBoolean("String_Node_Str",true);
  Settings.fullArmorProtection=getConfig().getBoolean("String_Node_Str",false);
  Settings.acidItemDestroyTime=getConfig().getLong("String_Node_Str",0L) * 20L;
  Settings.hackSkeletonSpawners=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowObsidianScooping=getConfig().getBoolean("String_Node_Str",true);
  Settings.kickedKeepInv=getConfig().getBoolean("String_Node_Str",false);
  Settings.chatLevelPrefix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.chatChallengeLevelPrefix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.chatIslandPlayer=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.netherRoof=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowAutoActivator=getConfig().getBoolean("String_Node_Str");
  Settings.debug=getConfig().getInt("String_Node_Str",0);
  Settings.persistantCoops=getConfig().getBoolean("String_Node_Str");
  Settings.onlyLeaderCanCoop=getConfig().getBoolean("String_Node_Str",false);
  Settings.levelLogging=getConfig().getBoolean("String_Node_Str");
  Settings.allowPushing=getConfig().getBoolean("String_Node_Str",true);
  if (Settings.allowPushing) {
    try {
      ScoreboardManager manager=getServer().getScoreboardManager();
      if (manager != null) {
        Scoreboard scoreboard=manager.getMainScoreboard();
        if (scoreboard != null) {
          Team pTeam=scoreboard.getTeam(NO_PUSH_TEAM_NAME);
          if (pTeam != null) {
            pTeam.unregister();
          }
        }
      }
    }
 catch (    Exception e) {
      getLogger().warning("String_Node_Str");
    }
  }
  Settings.useOwnGenerator=getConfig().getBoolean("String_Node_Str",false);
  Settings.backupDuration=(getConfig().getLong("String_Node_Str",5) * 20 * 60);
  Settings.pvpRestartCooldown=getConfig().getLong("String_Node_Str",60);
  Settings.maxIslands=getConfig().getInt("String_Node_Str",0);
  Settings.muteDeathMessages=getConfig().getBoolean("String_Node_Str",false);
  Settings.warpLevelsRestriction=getConfig().getInt("String_Node_Str",10);
  Settings.useWarpPanel=getConfig().getBoolean("String_Node_Str",true);
  Settings.fastLevelCalc=getConfig().getBoolean("String_Node_Str",true);
  Settings.restrictWither=getConfig().getBoolean("String_Node_Str",true);
  Settings.teamChat=getConfig().getBoolean("String_Node_Str",true);
  Settings.logTeamChat=getConfig().getBoolean("String_Node_Str",true);
  Settings.setTeamName=getConfig().getBoolean("String_Node_Str",false);
  Settings.teamSuffix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.immediateTeleport=getConfig().getBoolean("String_Node_Str",false);
  Settings.makeIslandIfNone=getConfig().getBoolean("String_Node_Str",false);
  Settings.usePhysics=getConfig().getBoolean("String_Node_Str",false);
  Settings.displayIslandTopTenInChat=getConfig().getBoolean("String_Node_Str",false);
  Settings.loginLevel=getConfig().getBoolean("String_Node_Str",false);
  Settings.useEconomy=getConfig().getBoolean("String_Node_Str",true);
  Settings.useMinishop=getConfig().getBoolean("String_Node_Str",true);
  Settings.updateCheck=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetCommands=getConfig().getStringList("String_Node_Str");
  Settings.leaveCommands=getConfig().getStringList("String_Node_Str");
  Settings.startCommands=getConfig().getStringList("String_Node_Str");
  Settings.teamStartCommands=getConfig().getStringList("String_Node_Str");
  Settings.useControlPanel=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowTeleportWhenFalling=getConfig().getBoolean("String_Node_Str",true);
  Settings.fallingCommandBlockList=getConfig().getStringList("String_Node_Str");
  Settings.visitorCommandBlockList=getConfig().getStringList("String_Node_Str");
  Settings.maxTeamSize=getConfig().getInt("String_Node_Str",4);
  Settings.maxTeamSizeVIP=getConfig().getInt("String_Node_Str",0);
  Settings.maxTeamSizeVIP2=getConfig().getInt("String_Node_Str",0);
  if (Settings.maxTeamSizeVIP > 0 || Settings.maxTeamSizeVIP2 > 0) {
    getLogger().warning(Settings.PERMPREFIX + "String_Node_Str" + Settings.PERMPREFIX+ "String_Node_Str");
    getLogger().warning("String_Node_Str" + Settings.PERMPREFIX + "String_Node_Str");
  }
  Settings.maxHomes=getConfig().getInt("String_Node_Str",1);
  if (Settings.maxHomes < 1) {
    Settings.maxHomes=1;
  }
  Settings.flyTimeOutside=getConfig().getInt("String_Node_Str",0);
  if (Settings.flyTimeOutside < 0) {
    Settings.flyTimeOutside=0;
  }
  Settings.temporaryPermissions=getConfig().getStringList("String_Node_Str");
  Settings.worldName=getConfig().getString("String_Node_Str");
  File islandFile=new File(plugin.getDataFolder(),"String_Node_Str");
  if (islandFile.exists()) {
    YamlConfiguration islandYaml=new YamlConfiguration();
    try {
      islandYaml.load(islandFile);
      if (!islandYaml.contains(Settings.worldName)) {
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        return false;
      }
    }
 catch (    Exception e) {
    }
  }
  Settings.createNether=getConfig().getBoolean("String_Node_Str",true);
  if (!Settings.createNether) {
    getLogger().info("String_Node_Str");
  }
  String companion=getConfig().getString("String_Node_Str","String_Node_Str").toUpperCase();
  Settings.islandCompanion=null;
  if (!companion.equalsIgnoreCase("String_Node_Str")) {
    String commaList="String_Node_Str";
    for (    EntityType type : EntityType.values()) {
      if (companion.equalsIgnoreCase(type.toString())) {
        Settings.islandCompanion=type;
        break;
      }
      commaList+="String_Node_Str" + type.toString();
    }
    if (Settings.islandCompanion == null) {
      getLogger().warning("String_Node_Str" + commaList);
    }
  }
  List<String> companionNames=getConfig().getStringList("String_Node_Str");
  Settings.companionNames=new ArrayList<String>();
  for (  String name : companionNames) {
    Settings.companionNames.add(ChatColor.translateAlternateColorCodes('&',name));
  }
  Settings.islandDistance=getConfig().getInt("String_Node_Str",200);
  if (Settings.islandDistance < 50) {
    Settings.islandDistance=50;
    getLogger().info("String_Node_Str");
  }
  Settings.island_protectionRange=getConfig().getInt("String_Node_Str",100);
  if (Settings.island_protectionRange % 2 != 0) {
    Settings.island_protectionRange--;
    getLogger().warning("String_Node_Str" + Settings.island_protectionRange);
  }
  if (Settings.island_protectionRange > Settings.islandDistance) {
    getLogger().warning("String_Node_Str");
    Settings.island_protectionRange=Settings.islandDistance;
  }
  if (Settings.island_protectionRange < 0) {
    Settings.island_protectionRange=0;
  }
  Settings.islandXOffset=getConfig().getInt("String_Node_Str",0);
  if (Settings.islandXOffset < 0) {
    Settings.islandXOffset=0;
    getLogger().info("String_Node_Str");
  }
 else   if (Settings.islandXOffset > Settings.islandDistance) {
    Settings.islandXOffset=Settings.islandDistance;
    getLogger().info("String_Node_Str" + Settings.islandDistance);
  }
  Settings.islandZOffset=getConfig().getInt("String_Node_Str",0);
  if (Settings.islandZOffset < 0) {
    Settings.islandZOffset=0;
    getLogger().info("String_Node_Str");
  }
 else   if (Settings.islandZOffset > Settings.islandDistance) {
    Settings.islandZOffset=Settings.islandDistance;
    getLogger().info("String_Node_Str" + Settings.islandDistance);
  }
  long x=getConfig().getLong("String_Node_Str",0);
  long z=getConfig().getLong("String_Node_Str",0);
  Settings.islandStartX=Math.round((double)x / Settings.islandDistance) * Settings.islandDistance + Settings.islandXOffset;
  Settings.islandStartZ=Math.round((double)z / Settings.islandDistance) * Settings.islandDistance + Settings.islandZOffset;
  if (Settings.GAMETYPE.equals(Settings.GameType.ACIDISLAND)) {
    Settings.acidDamage=getConfig().getDouble("String_Node_Str",5D);
    if (Settings.acidDamage > 100D) {
      Settings.acidDamage=100D;
    }
 else     if (Settings.acidDamage < 0D) {
      Settings.acidDamage=0D;
    }
    Settings.mobAcidDamage=getConfig().getDouble("String_Node_Str",10D);
    if (Settings.mobAcidDamage > 100D) {
      Settings.mobAcidDamage=100D;
    }
 else     if (Settings.mobAcidDamage < 0D) {
      Settings.mobAcidDamage=0D;
    }
    Settings.rainDamage=getConfig().getDouble("String_Node_Str",0.5D);
    if (Settings.rainDamage > 100D) {
      Settings.rainDamage=100D;
    }
 else     if (Settings.rainDamage < 0D) {
      Settings.rainDamage=0D;
    }
    Settings.sea_level=getConfig().getInt("String_Node_Str",50);
    if (Settings.sea_level < 0) {
      Settings.sea_level=0;
    }
    Settings.island_level=getConfig().getInt("String_Node_Str",50) - 5;
    if (Settings.island_level < 0) {
      Settings.island_level=0;
    }
  }
 else {
    Settings.acidDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.acidDamage > 100D) {
      Settings.acidDamage=100D;
    }
 else     if (Settings.acidDamage < 0D) {
      Settings.acidDamage=0D;
    }
    Settings.mobAcidDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.mobAcidDamage > 100D) {
      Settings.mobAcidDamage=100D;
    }
 else     if (Settings.mobAcidDamage < 0D) {
      Settings.mobAcidDamage=0D;
    }
    Settings.rainDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.rainDamage > 100D) {
      Settings.rainDamage=100D;
    }
 else     if (Settings.rainDamage < 0D) {
      Settings.rainDamage=0D;
    }
    Settings.sea_level=getConfig().getInt("String_Node_Str",0);
    if (Settings.sea_level < 0) {
      Settings.sea_level=0;
    }
    Settings.island_level=getConfig().getInt("String_Node_Str",120) - 5;
    if (Settings.island_level < 0) {
      Settings.island_level=0;
    }
  }
  Settings.animalAcidDamage=getConfig().getDouble("String_Node_Str",0D);
  if (Settings.animalAcidDamage > 100D) {
    Settings.animalAcidDamage=100D;
  }
 else   if (Settings.animalAcidDamage < 0D) {
    Settings.animalAcidDamage=0D;
  }
  Settings.damageChickens=getConfig().getBoolean("String_Node_Str",false);
  List<String> acidDamageType=getConfig().getStringList("String_Node_Str");
  Settings.acidDamageType.clear();
  if (acidDamageType != null) {
    for (    String effect : acidDamageType) {
      PotionEffectType newPotionType=PotionEffectType.getByName(effect);
      if (newPotionType != null) {
        if (newPotionType.equals(PotionEffectType.BLINDNESS) || newPotionType.equals(PotionEffectType.CONFUSION) || newPotionType.equals(PotionEffectType.HUNGER)|| newPotionType.equals(PotionEffectType.POISON)|| newPotionType.equals(PotionEffectType.SLOW)|| newPotionType.equals(PotionEffectType.SLOW_DIGGING)|| newPotionType.equals(PotionEffectType.WEAKNESS)) {
          Settings.acidDamageType.add(newPotionType);
        }
      }
 else {
        getLogger().warning("String_Node_Str" + effect + "String_Node_Str");
        getLogger().warning("String_Node_Str");
        getLogger().warning("String_Node_Str");
      }
    }
  }
  Settings.animalSpawnLimit=getConfig().getInt("String_Node_Str",15);
  if (Settings.animalSpawnLimit < -1) {
    Settings.animalSpawnLimit=-1;
  }
  Settings.monsterSpawnLimit=getConfig().getInt("String_Node_Str",100);
  if (Settings.monsterSpawnLimit < -1) {
    Settings.monsterSpawnLimit=-1;
  }
  Settings.waterAnimalSpawnLimit=getConfig().getInt("String_Node_Str",15);
  if (Settings.waterAnimalSpawnLimit < -1) {
    Settings.waterAnimalSpawnLimit=-1;
  }
  Settings.abandonedIslandLevel=getConfig().getInt("String_Node_Str",10);
  if (Settings.abandonedIslandLevel < 0) {
    Settings.abandonedIslandLevel=0;
  }
  Settings.resetChallenges=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetMoney=getConfig().getBoolean("String_Node_Str",true);
  Settings.clearInventory=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetEnderChest=getConfig().getBoolean("String_Node_Str",false);
  Settings.startingMoney=getConfig().getDouble("String_Node_Str",0D);
  Settings.respawnOnIsland=getConfig().getBoolean("String_Node_Str",false);
  Settings.newNether=getConfig().getBoolean("String_Node_Str",true);
  Settings.netherTrees=getConfig().getBoolean("String_Node_Str",true);
  Settings.netherSpawnRadius=getConfig().getInt("String_Node_Str",25);
  if (Settings.netherSpawnRadius < 0) {
    Settings.netherSpawnRadius=0;
  }
 else   if (Settings.netherSpawnRadius > 100) {
    Settings.netherSpawnRadius=100;
  }
  Settings.resetWait=getConfig().getInt("String_Node_Str",300);
  if (Settings.resetWait < 0) {
    Settings.resetWait=0;
  }
  Settings.resetLimit=getConfig().getInt("String_Node_Str",0);
  if (Settings.resetWait < 0) {
    Settings.resetWait=-1;
  }
  Settings.inviteWait=getConfig().getInt("String_Node_Str",60);
  if (Settings.inviteWait < 0) {
    Settings.inviteWait=0;
  }
  Settings.levelWait=getConfig().getInt("String_Node_Str",60);
  if (Settings.levelWait < 0) {
    Settings.levelWait=0;
  }
  Settings.resetConfirmWait=getConfig().getInt("String_Node_Str",10);
  if (Settings.resetConfirmWait < 0) {
    Settings.resetConfirmWait=0;
  }
  Settings.damageOps=getConfig().getBoolean("String_Node_Str",false);
  Settings.invincibleVisitors=getConfig().getBoolean("String_Node_Str",false);
  if (Settings.invincibleVisitors) {
    Settings.visitorDamagePrevention=new HashSet<DamageCause>();
    List<String> damageSettings=getConfig().getStringList("String_Node_Str");
    for (    DamageCause cause : DamageCause.values()) {
      if (damageSettings.contains(cause.toString())) {
        Settings.visitorDamagePrevention.add(cause);
      }
    }
  }
  Settings.logInRemoveMobs=getConfig().getBoolean("String_Node_Str",true);
  Settings.islandRemoveMobs=getConfig().getBoolean("String_Node_Str",false);
  List<String> mobWhiteList=getConfig().getStringList("String_Node_Str");
  Settings.mobWhiteList.clear();
  String valid="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  for (  String mobName : mobWhiteList) {
    if (valid.contains(mobName.toUpperCase())) {
      try {
        Settings.mobWhiteList.add(EntityType.valueOf(mobName.toUpperCase()));
      }
 catch (      Exception e) {
        plugin.getLogger().severe("String_Node_Str" + mobName + "String_Node_Str");
        plugin.getLogger().severe("String_Node_Str" + "String_Node_Str");
      }
    }
 else {
      plugin.getLogger().severe("String_Node_Str" + mobName + "String_Node_Str");
      plugin.getLogger().severe("String_Node_Str" + "String_Node_Str");
    }
  }
  String chestItems=getConfig().getString("String_Node_Str","String_Node_Str");
  if (!chestItems.isEmpty()) {
    final String[] chestItemString=chestItems.split("String_Node_Str");
    final ItemStack[] tempChest=new ItemStack[chestItemString.length];
    for (int i=0; i < tempChest.length; i++) {
      String[] amountdata=chestItemString[i].split("String_Node_Str");
      try {
        if (amountdata.length == 3 && amountdata[0].equalsIgnoreCase("String_Node_Str")) {
          try {
            EntityType type=EntityType.valueOf(amountdata[1].toUpperCase());
            if (Bukkit.getServer().getVersion().contains("String_Node_Str") || Bukkit.getServer().getVersion().contains("String_Node_Str")) {
              tempChest[i]=new SpawnEgg(type).toItemStack(Integer.parseInt(amountdata[2]));
            }
 else {
              try {
                tempChest[i]=new SpawnEgg1_9(type).toItemStack(Integer.parseInt(amountdata[2]));
              }
 catch (              Exception ex) {
                tempChest[i]=new ItemStack(Material.MONSTER_EGG);
                plugin.getLogger().severe("String_Node_Str");
              }
            }
          }
 catch (          Exception e) {
            Bukkit.getLogger().severe("String_Node_Str");
            for (            EntityType type : EntityType.values()) {
              if (type.isSpawnable() && type.isAlive()) {
                plugin.getLogger().severe(type.toString());
              }
            }
          }
        }
 else         if (amountdata[0].equals("String_Node_Str")) {
          if (amountdata.length == 6) {
            tempChest[i]=Challenges.getPotion(amountdata,Integer.parseInt(amountdata[5]),"String_Node_Str");
          }
 else {
            getLogger().severe("String_Node_Str" + chestItemString[i]);
            getLogger().severe("String_Node_Str");
          }
        }
 else {
          Material mat;
          if (StringUtils.isNumeric(amountdata[0])) {
            mat=Material.getMaterial(Integer.parseInt(amountdata[0]));
          }
 else {
            mat=Material.getMaterial(amountdata[0].toUpperCase());
          }
          if (amountdata.length == 2) {
            tempChest[i]=new ItemStack(mat,Integer.parseInt(amountdata[1]));
          }
 else           if (amountdata.length == 3) {
            tempChest[i]=new ItemStack(mat,Integer.parseInt(amountdata[2]),Short.parseShort(amountdata[1]));
          }
        }
      }
 catch (      java.lang.IllegalArgumentException ex) {
        ex.printStackTrace();
        getLogger().severe("String_Node_Str" + chestItemString[i]);
        getLogger().severe("String_Node_Str" + ex.getMessage());
        getLogger().info("String_Node_Str");
        for (        PotionType c : PotionType.values())         getLogger().info(c.name());
      }
catch (      Exception e) {
        e.printStackTrace();
        getLogger().severe("String_Node_Str" + chestItemString[i]);
        getLogger().info("String_Node_Str");
        for (        Material c : Material.values())         getLogger().info(c.name());
      }
    }
    Settings.chestItems=tempChest;
  }
 else {
    Settings.chestItems=new ItemStack[0];
  }
  Settings.endermanDeathDrop=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowEndermanGriefing=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowCreeperDamage=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowCreeperGriefing=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowTNTDamage=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowFireExtinguish=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowChestDamage=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowVisitorKeepInvOnDeath=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowPistonPush=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowMobDamageToItemFrames=getConfig().getBoolean("String_Node_Str",false);
  Settings.defaultWorldSettings.clear();
  Settings.defaultIslandSettings.clear();
  Settings.defaultSpawnSettings.clear();
  Settings.visitorSettings.clear();
  for (  SettingsFlag flag : SettingsFlag.values()) {
    Settings.defaultWorldSettings.put(flag,getConfig().getBoolean("String_Node_Str" + flag.name()));
    Settings.defaultSpawnSettings.put(flag,Settings.defaultWorldSettings.get(flag));
    if (getConfig().contains("String_Node_Str" + flag.name())) {
      Settings.visitorSettings.put(flag,Settings.defaultIslandSettings.get(flag));
      Settings.defaultIslandSettings.put(flag,getConfig().getBoolean("String_Node_Str" + flag.name(),Settings.defaultWorldSettings.get(flag)));
    }
 else {
      Settings.defaultIslandSettings.put(flag,Settings.defaultWorldSettings.get(flag));
    }
  }
  getChallenges();
  Settings.broadcastMessages=getConfig().getBoolean("String_Node_Str",true);
  YamlConfiguration blockValuesConfig=Util.loadYamlFile("String_Node_Str");
  Settings.deathpenalty=blockValuesConfig.getInt("String_Node_Str",0);
  Settings.sumTeamDeaths=blockValuesConfig.getBoolean("String_Node_Str");
  Settings.maxDeaths=blockValuesConfig.getInt("String_Node_Str",10);
  Settings.islandResetDeathReset=blockValuesConfig.getBoolean("String_Node_Str",true);
  Settings.teamJoinDeathReset=blockValuesConfig.getBoolean("String_Node_Str",true);
  Settings.underWaterMultiplier=blockValuesConfig.getDouble("String_Node_Str",1D);
  Settings.levelCost=blockValuesConfig.getInt("String_Node_Str",100);
  if (Settings.levelCost < 1) {
    Settings.levelCost=1;
    getLogger().warning("String_Node_Str");
  }
  Settings.blockLimits=new HashMap<MaterialData,Integer>();
  if (blockValuesConfig.isSet("String_Node_Str")) {
    for (    String material : blockValuesConfig.getConfigurationSection("String_Node_Str").getKeys(false)) {
      try {
        String[] split=material.split("String_Node_Str");
        byte data=0;
        if (split.length > 1) {
          data=Byte.valueOf(split[1]);
        }
        Material mat;
        if (StringUtils.isNumeric(split[0])) {
          mat=Material.getMaterial(Integer.parseInt(split[0]));
        }
 else {
          mat=Material.valueOf(split[0].toUpperCase());
        }
        MaterialData materialData=new MaterialData(mat);
        materialData.setData(data);
        Settings.blockLimits.put(materialData,blockValuesConfig.getInt("String_Node_Str" + material,0));
        if (debug) {
          getLogger().info("String_Node_Str" + materialData + "String_Node_Str"+ Settings.blockLimits.get(materialData));
        }
      }
 catch (      Exception e) {
        getLogger().warning("String_Node_Str" + material + "String_Node_Str");
      }
    }
  }
  Settings.blockValues=new HashMap<MaterialData,Integer>();
  if (blockValuesConfig.isSet("String_Node_Str")) {
    for (    String material : blockValuesConfig.getConfigurationSection("String_Node_Str").getKeys(false)) {
      try {
        String[] split=material.split("String_Node_Str");
        byte data=0;
        if (split.length > 1) {
          data=Byte.valueOf(split[1]);
        }
        Material mat;
        if (StringUtils.isNumeric(split[0])) {
          mat=Material.getMaterial(Integer.parseInt(split[0]));
        }
 else {
          mat=Material.valueOf(split[0].toUpperCase());
        }
        MaterialData materialData=new MaterialData(mat);
        materialData.setData(data);
        Settings.blockValues.put(materialData,blockValuesConfig.getInt("String_Node_Str" + material,0));
        if (debug) {
          getLogger().info(mat.toString() + "String_Node_Str" + Settings.blockValues.get(mat));
        }
      }
 catch (      Exception e) {
        getLogger().warning("String_Node_Str" + material + "String_Node_Str");
      }
    }
  }
 else {
    getLogger().severe("String_Node_Str");
  }
  Settings.biomeCost=getConfig().getDouble("String_Node_Str",100D);
  if (Settings.biomeCost < 0D) {
    Settings.biomeCost=0D;
    getLogger().warning("String_Node_Str");
  }
  String defaultBiome=getConfig().getString("String_Node_Str","String_Node_Str");
  try {
    Settings.defaultBiome=Biome.valueOf(defaultBiome);
  }
 catch (  Exception e) {
    getLogger().severe("String_Node_Str" + defaultBiome + "String_Node_Str");
    Settings.defaultBiome=Biome.PLAINS;
  }
  Settings.breedingLimit=getConfig().getInt("String_Node_Str",0);
  Settings.villagerLimit=getConfig().getInt("String_Node_Str",0);
  Settings.limitedBlocks=new HashMap<String,Integer>();
  Settings.entityLimits=new HashMap<EntityType,Integer>();
  ConfigurationSection entityLimits=getConfig().getConfigurationSection("String_Node_Str");
  if (entityLimits != null) {
    for (    String entity : entityLimits.getKeys(false)) {
      int limit=entityLimits.getInt(entity.toUpperCase(),-1);
      if (limit > 0) {
        getLogger().info(entity.toUpperCase() + "String_Node_Str" + limit);
      }
      if (Material.getMaterial(entity.toUpperCase()) == null) {
        EntityType type=EntityType.valueOf(entity.toUpperCase());
        if (type != null && type.isAlive()) {
          Settings.entityLimits.put(type,limit);
        }
 else {
          getLogger().warning("String_Node_Str" + entity.toUpperCase() + "String_Node_Str");
        }
      }
 else       if (limit > -1) {
        Settings.limitedBlocks.put(entity.toUpperCase(),limit);
        if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
 else         if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
 else         if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
      }
    }
  }
  if (Settings.limitedBlocks.isEmpty()) {
    Settings.hopperLimit=getConfig().getInt("String_Node_Str",-1);
    if (Settings.hopperLimit > 0) {
      Settings.limitedBlocks.put("String_Node_Str",Settings.hopperLimit);
    }
  }
  Settings.mobLimit=getConfig().getInt("String_Node_Str",0);
  Settings.removeCompleteOntimeChallenges=getConfig().getBoolean("String_Node_Str",false);
  Settings.addCompletedGlow=getConfig().getBoolean("String_Node_Str",true);
  Settings.cleanRate=getConfig().getInt("String_Node_Str",2);
  if (Settings.cleanRate < 1) {
    Settings.cleanRate=1;
  }
  Settings.acidBottle=getConfig().getBoolean("String_Node_Str",true);
  Settings.minNameLength=getConfig().getInt("String_Node_Str",1);
  Settings.maxNameLength=getConfig().getInt("String_Node_Str",20);
  if (Settings.minNameLength < 0) {
    Settings.minNameLength=0;
  }
  if (Settings.maxNameLength < 1) {
    Settings.maxNameLength=1;
  }
  if (Settings.minNameLength > Settings.maxNameLength) {
    Settings.minNameLength=Settings.maxNameLength;
  }
  Settings.useMagicCobbleGen=getConfig().getBoolean("String_Node_Str",false);
  if (Settings.useMagicCobbleGen) {
    Settings.magicCobbleGenOnlyAtSpawn=getConfig().getBoolean("String_Node_Str",false);
    if (getConfig().isSet("String_Node_Str")) {
      Settings.magicCobbleGenChances=new TreeMap<Integer,TreeMap<Double,Material>>();
      for (      String level : getConfig().getConfigurationSection("String_Node_Str").getKeys(false)) {
        int levelInt=0;
        try {
          if (level.equals("String_Node_Str")) {
            levelInt=Integer.MIN_VALUE;
          }
 else {
            levelInt=Integer.parseInt(level);
          }
          TreeMap<Double,Material> blockMapTree=new TreeMap<Double,Material>();
          double chanceTotal=0;
          for (          String block : getConfig().getConfigurationSection("String_Node_Str" + level).getKeys(false)) {
            double chance=getConfig().getDouble("String_Node_Str" + level + "String_Node_Str"+ block,0D);
            if (chance > 0 && Material.getMaterial(block) != null && Material.getMaterial(block).isBlock()) {
              chanceTotal+=chance;
              blockMapTree.put(chanceTotal,Material.getMaterial(block));
            }
          }
          if (!blockMapTree.isEmpty()) {
            Settings.magicCobbleGenChances.put(levelInt,blockMapTree);
          }
        }
 catch (        NumberFormatException e) {
          getLogger().severe("String_Node_Str" + level + "String_Node_Str");
        }
      }
    }
  }
  Settings.disableOfflineRedstone=getConfig().getBoolean("String_Node_Str",false);
  Settings.fancyIslandLevelDisplay=getConfig().getBoolean("String_Node_Str",false);
  return true;
}

Fixed version (ground truth):
/** 
 * Loads the various settings from the config.yml file into the plugin
 */
@SuppressWarnings("String_Node_Str") public boolean loadPluginConfig(){
  try {
    getConfig();
  }
 catch (  final Exception e) {
    e.printStackTrace();
  }
  FileLister fl=new FileLister(this);
  try {
    int index=1;
    for (    String code : fl.list()) {
      availableLocales.put(code,new ASLocale(this,code,index++));
    }
  }
 catch (  IOException e1) {
    getLogger().severe("String_Node_Str");
  }
  availableLocales.put("String_Node_Str",new ASLocale(this,"String_Node_Str",0));
  String configVersion=getConfig().getString("String_Node_Str","String_Node_Str");
  if (configVersion.split("String_Node_Str").length == 4) {
    configVersion=configVersion.substring(0,configVersion.lastIndexOf('.'));
  }
  String version=plugin.getDescription().getVersion();
  if (version.split("String_Node_Str").length == 4) {
    version=version.substring(0,version.lastIndexOf('.'));
  }
  if (configVersion.isEmpty() || !configVersion.equalsIgnoreCase(version)) {
    File newConfig=new File(plugin.getDataFolder(),"String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str" + configVersion + "String_Node_Str");
    getLogger().warning("String_Node_Str" + version + "String_Node_Str");
    getLogger().warning("String_Node_Str");
    if (!newConfig.exists()) {
      File oldConfig=new File(plugin.getDataFolder(),"String_Node_Str");
      File bakConfig=new File(plugin.getDataFolder(),"String_Node_Str");
      if (oldConfig.renameTo(bakConfig)) {
        plugin.saveResource("String_Node_Str",false);
        oldConfig.renameTo(newConfig);
        bakConfig.renameTo(oldConfig);
      }
    }
  }
  Settings.recoverSuperFlat=getConfig().getBoolean("String_Node_Str");
  if (Settings.recoverSuperFlat) {
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
    getLogger().warning("String_Node_Str");
  }
  Settings.helmetProtection=getConfig().getBoolean("String_Node_Str",true);
  Settings.fullArmorProtection=getConfig().getBoolean("String_Node_Str",false);
  Settings.acidItemDestroyTime=getConfig().getLong("String_Node_Str",0L) * 20L;
  Settings.hackSkeletonSpawners=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowObsidianScooping=getConfig().getBoolean("String_Node_Str",true);
  Settings.kickedKeepInv=getConfig().getBoolean("String_Node_Str",false);
  Settings.chatLevelPrefix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.chatChallengeLevelPrefix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.chatIslandPlayer=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.netherRoof=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowAutoActivator=getConfig().getBoolean("String_Node_Str");
  Settings.debug=getConfig().getInt("String_Node_Str",0);
  Settings.persistantCoops=getConfig().getBoolean("String_Node_Str");
  Settings.onlyLeaderCanCoop=getConfig().getBoolean("String_Node_Str",false);
  Settings.levelLogging=getConfig().getBoolean("String_Node_Str");
  Settings.allowPushing=getConfig().getBoolean("String_Node_Str",true);
  if (Settings.allowPushing) {
    try {
      ScoreboardManager manager=getServer().getScoreboardManager();
      if (manager != null) {
        Scoreboard scoreboard=manager.getMainScoreboard();
        if (scoreboard != null) {
          Team pTeam=scoreboard.getTeam(NO_PUSH_TEAM_NAME);
          if (pTeam != null) {
            pTeam.unregister();
          }
        }
      }
    }
 catch (    Exception e) {
      getLogger().warning("String_Node_Str");
    }
  }
  Settings.useOwnGenerator=getConfig().getBoolean("String_Node_Str",false);
  Settings.backupDuration=(getConfig().getLong("String_Node_Str",5) * 20 * 60);
  Settings.pvpRestartCooldown=getConfig().getLong("String_Node_Str",60);
  Settings.maxIslands=getConfig().getInt("String_Node_Str",0);
  Settings.muteDeathMessages=getConfig().getBoolean("String_Node_Str",false);
  Settings.warpLevelsRestriction=getConfig().getInt("String_Node_Str",10);
  Settings.useWarpPanel=getConfig().getBoolean("String_Node_Str",true);
  Settings.fastLevelCalc=getConfig().getBoolean("String_Node_Str",true);
  Settings.restrictWither=getConfig().getBoolean("String_Node_Str",true);
  Settings.teamChat=getConfig().getBoolean("String_Node_Str",true);
  Settings.logTeamChat=getConfig().getBoolean("String_Node_Str",true);
  Settings.setTeamName=getConfig().getBoolean("String_Node_Str",false);
  Settings.teamSuffix=getConfig().getString("String_Node_Str","String_Node_Str");
  Settings.immediateTeleport=getConfig().getBoolean("String_Node_Str",false);
  Settings.makeIslandIfNone=getConfig().getBoolean("String_Node_Str",false);
  Settings.usePhysics=getConfig().getBoolean("String_Node_Str",false);
  Settings.displayIslandTopTenInChat=getConfig().getBoolean("String_Node_Str",false);
  Settings.loginLevel=getConfig().getBoolean("String_Node_Str",false);
  Settings.useEconomy=getConfig().getBoolean("String_Node_Str",true);
  Settings.useMinishop=getConfig().getBoolean("String_Node_Str",true);
  Settings.updateCheck=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetCommands=getConfig().getStringList("String_Node_Str");
  Settings.leaveCommands=getConfig().getStringList("String_Node_Str");
  Settings.startCommands=getConfig().getStringList("String_Node_Str");
  Settings.teamStartCommands=getConfig().getStringList("String_Node_Str");
  Settings.useControlPanel=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowTeleportWhenFalling=getConfig().getBoolean("String_Node_Str",true);
  Settings.fallingCommandBlockList=getConfig().getStringList("String_Node_Str");
  Settings.visitorCommandBlockList=getConfig().getStringList("String_Node_Str");
  Settings.maxTeamSize=getConfig().getInt("String_Node_Str",4);
  Settings.maxTeamSizeVIP=getConfig().getInt("String_Node_Str",0);
  Settings.maxTeamSizeVIP2=getConfig().getInt("String_Node_Str",0);
  if (Settings.maxTeamSizeVIP > 0 || Settings.maxTeamSizeVIP2 > 0) {
    getLogger().warning(Settings.PERMPREFIX + "String_Node_Str" + Settings.PERMPREFIX+ "String_Node_Str");
    getLogger().warning("String_Node_Str" + Settings.PERMPREFIX + "String_Node_Str");
  }
  Settings.maxHomes=getConfig().getInt("String_Node_Str",1);
  if (Settings.maxHomes < 1) {
    Settings.maxHomes=1;
  }
  Settings.flyTimeOutside=getConfig().getInt("String_Node_Str",0);
  if (Settings.flyTimeOutside < 0) {
    Settings.flyTimeOutside=0;
  }
  Settings.temporaryPermissions=getConfig().getStringList("String_Node_Str");
  Settings.worldName=getConfig().getString("String_Node_Str");
  File islandFile=new File(plugin.getDataFolder(),"String_Node_Str");
  if (islandFile.exists()) {
    YamlConfiguration islandYaml=new YamlConfiguration();
    try {
      islandYaml.load(islandFile);
      if (!islandYaml.contains(Settings.worldName)) {
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        getLogger().severe("String_Node_Str");
        return false;
      }
    }
 catch (    Exception e) {
    }
  }
  Settings.createNether=getConfig().getBoolean("String_Node_Str",true);
  if (!Settings.createNether) {
    getLogger().info("String_Node_Str");
  }
  String companion=getConfig().getString("String_Node_Str","String_Node_Str").toUpperCase();
  Settings.islandCompanion=null;
  if (!companion.equalsIgnoreCase("String_Node_Str")) {
    String commaList="String_Node_Str";
    for (    EntityType type : EntityType.values()) {
      if (companion.equalsIgnoreCase(type.toString())) {
        Settings.islandCompanion=type;
        break;
      }
      commaList+="String_Node_Str" + type.toString();
    }
    if (Settings.islandCompanion == null) {
      getLogger().warning("String_Node_Str" + commaList);
    }
  }
  List<String> companionNames=getConfig().getStringList("String_Node_Str");
  Settings.companionNames=new ArrayList<String>();
  for (  String name : companionNames) {
    Settings.companionNames.add(ChatColor.translateAlternateColorCodes('&',name));
  }
  Settings.islandDistance=getConfig().getInt("String_Node_Str",200);
  if (Settings.islandDistance < 50) {
    Settings.islandDistance=50;
    getLogger().info("String_Node_Str");
  }
  Settings.island_protectionRange=getConfig().getInt("String_Node_Str",100);
  if (Settings.island_protectionRange % 2 != 0) {
    Settings.island_protectionRange--;
    getLogger().warning("String_Node_Str" + Settings.island_protectionRange);
  }
  if (Settings.island_protectionRange > Settings.islandDistance) {
    getLogger().warning("String_Node_Str");
    Settings.island_protectionRange=Settings.islandDistance;
  }
  if (Settings.island_protectionRange < 0) {
    Settings.island_protectionRange=0;
  }
  Settings.islandXOffset=getConfig().getInt("String_Node_Str",0);
  if (Settings.islandXOffset < 0) {
    Settings.islandXOffset=0;
    getLogger().info("String_Node_Str");
  }
 else   if (Settings.islandXOffset > Settings.islandDistance) {
    Settings.islandXOffset=Settings.islandDistance;
    getLogger().info("String_Node_Str" + Settings.islandDistance);
  }
  Settings.islandZOffset=getConfig().getInt("String_Node_Str",0);
  if (Settings.islandZOffset < 0) {
    Settings.islandZOffset=0;
    getLogger().info("String_Node_Str");
  }
 else   if (Settings.islandZOffset > Settings.islandDistance) {
    Settings.islandZOffset=Settings.islandDistance;
    getLogger().info("String_Node_Str" + Settings.islandDistance);
  }
  long x=getConfig().getLong("String_Node_Str",0);
  long z=getConfig().getLong("String_Node_Str",0);
  Settings.islandStartX=Math.round((double)x / Settings.islandDistance) * Settings.islandDistance + Settings.islandXOffset;
  Settings.islandStartZ=Math.round((double)z / Settings.islandDistance) * Settings.islandDistance + Settings.islandZOffset;
  if (Settings.GAMETYPE.equals(Settings.GameType.ACIDISLAND)) {
    Settings.acidDamage=getConfig().getDouble("String_Node_Str",5D);
    if (Settings.acidDamage > 100D) {
      Settings.acidDamage=100D;
    }
 else     if (Settings.acidDamage < 0D) {
      Settings.acidDamage=0D;
    }
    Settings.mobAcidDamage=getConfig().getDouble("String_Node_Str",10D);
    if (Settings.mobAcidDamage > 100D) {
      Settings.mobAcidDamage=100D;
    }
 else     if (Settings.mobAcidDamage < 0D) {
      Settings.mobAcidDamage=0D;
    }
    Settings.rainDamage=getConfig().getDouble("String_Node_Str",0.5D);
    if (Settings.rainDamage > 100D) {
      Settings.rainDamage=100D;
    }
 else     if (Settings.rainDamage < 0D) {
      Settings.rainDamage=0D;
    }
    Settings.sea_level=getConfig().getInt("String_Node_Str",50);
    if (Settings.sea_level < 0) {
      Settings.sea_level=0;
    }
    Settings.island_level=getConfig().getInt("String_Node_Str",50) - 5;
    if (Settings.island_level < 0) {
      Settings.island_level=0;
    }
  }
 else {
    Settings.acidDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.acidDamage > 100D) {
      Settings.acidDamage=100D;
    }
 else     if (Settings.acidDamage < 0D) {
      Settings.acidDamage=0D;
    }
    Settings.mobAcidDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.mobAcidDamage > 100D) {
      Settings.mobAcidDamage=100D;
    }
 else     if (Settings.mobAcidDamage < 0D) {
      Settings.mobAcidDamage=0D;
    }
    Settings.rainDamage=getConfig().getDouble("String_Node_Str",0D);
    if (Settings.rainDamage > 100D) {
      Settings.rainDamage=100D;
    }
 else     if (Settings.rainDamage < 0D) {
      Settings.rainDamage=0D;
    }
    Settings.sea_level=getConfig().getInt("String_Node_Str",0);
    if (Settings.sea_level < 0) {
      Settings.sea_level=0;
    }
    Settings.island_level=getConfig().getInt("String_Node_Str",120) - 5;
    if (Settings.island_level < 0) {
      Settings.island_level=0;
    }
  }
  Settings.animalAcidDamage=getConfig().getDouble("String_Node_Str",0D);
  if (Settings.animalAcidDamage > 100D) {
    Settings.animalAcidDamage=100D;
  }
 else   if (Settings.animalAcidDamage < 0D) {
    Settings.animalAcidDamage=0D;
  }
  Settings.damageChickens=getConfig().getBoolean("String_Node_Str",false);
  List<String> acidDamageType=getConfig().getStringList("String_Node_Str");
  Settings.acidDamageType.clear();
  if (acidDamageType != null) {
    for (    String effect : acidDamageType) {
      PotionEffectType newPotionType=PotionEffectType.getByName(effect);
      if (newPotionType != null) {
        if (newPotionType.equals(PotionEffectType.BLINDNESS) || newPotionType.equals(PotionEffectType.CONFUSION) || newPotionType.equals(PotionEffectType.HUNGER)|| newPotionType.equals(PotionEffectType.POISON)|| newPotionType.equals(PotionEffectType.SLOW)|| newPotionType.equals(PotionEffectType.SLOW_DIGGING)|| newPotionType.equals(PotionEffectType.WEAKNESS)) {
          Settings.acidDamageType.add(newPotionType);
        }
      }
 else {
        getLogger().warning("String_Node_Str" + effect + "String_Node_Str");
        getLogger().warning("String_Node_Str");
        getLogger().warning("String_Node_Str");
      }
    }
  }
  Settings.animalSpawnLimit=getConfig().getInt("String_Node_Str",15);
  if (Settings.animalSpawnLimit < -1) {
    Settings.animalSpawnLimit=-1;
  }
  Settings.monsterSpawnLimit=getConfig().getInt("String_Node_Str",100);
  if (Settings.monsterSpawnLimit < -1) {
    Settings.monsterSpawnLimit=-1;
  }
  Settings.waterAnimalSpawnLimit=getConfig().getInt("String_Node_Str",15);
  if (Settings.waterAnimalSpawnLimit < -1) {
    Settings.waterAnimalSpawnLimit=-1;
  }
  Settings.abandonedIslandLevel=getConfig().getInt("String_Node_Str",10);
  if (Settings.abandonedIslandLevel < 0) {
    Settings.abandonedIslandLevel=0;
  }
  Settings.resetChallenges=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetMoney=getConfig().getBoolean("String_Node_Str",true);
  Settings.clearInventory=getConfig().getBoolean("String_Node_Str",true);
  Settings.resetEnderChest=getConfig().getBoolean("String_Node_Str",false);
  Settings.startingMoney=getConfig().getDouble("String_Node_Str",0D);
  Settings.respawnOnIsland=getConfig().getBoolean("String_Node_Str",false);
  Settings.newNether=getConfig().getBoolean("String_Node_Str",true);
  Settings.netherTrees=getConfig().getBoolean("String_Node_Str",true);
  Settings.netherSpawnRadius=getConfig().getInt("String_Node_Str",25);
  if (Settings.netherSpawnRadius < 0) {
    Settings.netherSpawnRadius=0;
  }
 else   if (Settings.netherSpawnRadius > 100) {
    Settings.netherSpawnRadius=100;
  }
  Settings.resetWait=getConfig().getInt("String_Node_Str",300);
  if (Settings.resetWait < 0) {
    Settings.resetWait=0;
  }
  Settings.resetLimit=getConfig().getInt("String_Node_Str",0);
  if (Settings.resetWait < 0) {
    Settings.resetWait=-1;
  }
  Settings.inviteWait=getConfig().getInt("String_Node_Str",60);
  if (Settings.inviteWait < 0) {
    Settings.inviteWait=0;
  }
  Settings.levelWait=getConfig().getInt("String_Node_Str",60);
  if (Settings.levelWait < 0) {
    Settings.levelWait=0;
  }
  Settings.resetConfirmWait=getConfig().getInt("String_Node_Str",10);
  if (Settings.resetConfirmWait < 0) {
    Settings.resetConfirmWait=0;
  }
  Settings.damageOps=getConfig().getBoolean("String_Node_Str",false);
  Settings.invincibleVisitors=getConfig().getBoolean("String_Node_Str",false);
  if (Settings.invincibleVisitors) {
    Settings.visitorDamagePrevention=new HashSet<DamageCause>();
    List<String> damageSettings=getConfig().getStringList("String_Node_Str");
    for (    DamageCause cause : DamageCause.values()) {
      if (damageSettings.contains(cause.toString())) {
        Settings.visitorDamagePrevention.add(cause);
      }
    }
  }
  Settings.logInRemoveMobs=getConfig().getBoolean("String_Node_Str",true);
  Settings.islandRemoveMobs=getConfig().getBoolean("String_Node_Str",false);
  List<String> mobWhiteList=getConfig().getStringList("String_Node_Str");
  Settings.mobWhiteList.clear();
  String valid="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  for (  String mobName : mobWhiteList) {
    if (valid.contains(mobName.toUpperCase())) {
      try {
        Settings.mobWhiteList.add(EntityType.valueOf(mobName.toUpperCase()));
      }
 catch (      Exception e) {
        plugin.getLogger().severe("String_Node_Str" + mobName + "String_Node_Str");
        plugin.getLogger().severe("String_Node_Str" + "String_Node_Str");
      }
    }
 else {
      plugin.getLogger().severe("String_Node_Str" + mobName + "String_Node_Str");
      plugin.getLogger().severe("String_Node_Str" + "String_Node_Str");
    }
  }
  String chestItems=getConfig().getString("String_Node_Str","String_Node_Str");
  if (!chestItems.isEmpty()) {
    final String[] chestItemString=chestItems.split("String_Node_Str");
    final ItemStack[] tempChest=new ItemStack[chestItemString.length];
    for (int i=0; i < tempChest.length; i++) {
      String[] amountdata=chestItemString[i].split("String_Node_Str");
      try {
        if (amountdata.length == 3 && amountdata[0].equalsIgnoreCase("String_Node_Str")) {
          try {
            EntityType type=EntityType.valueOf(amountdata[1].toUpperCase());
            if (Bukkit.getServer().getVersion().contains("String_Node_Str") || Bukkit.getServer().getVersion().contains("String_Node_Str")) {
              tempChest[i]=new SpawnEgg(type).toItemStack(Integer.parseInt(amountdata[2]));
            }
 else {
              try {
                tempChest[i]=new SpawnEgg1_9(type).toItemStack(Integer.parseInt(amountdata[2]));
              }
 catch (              Exception ex) {
                tempChest[i]=new ItemStack(Material.MONSTER_EGG);
                plugin.getLogger().severe("String_Node_Str");
              }
            }
          }
 catch (          Exception e) {
            Bukkit.getLogger().severe("String_Node_Str");
            for (            EntityType type : EntityType.values()) {
              if (type.isSpawnable() && type.isAlive()) {
                plugin.getLogger().severe(type.toString());
              }
            }
          }
        }
 else         if (amountdata[0].equals("String_Node_Str")) {
          if (amountdata.length == 6) {
            tempChest[i]=Challenges.getPotion(amountdata,Integer.parseInt(amountdata[5]),"String_Node_Str");
          }
 else {
            getLogger().severe("String_Node_Str" + chestItemString[i]);
            getLogger().severe("String_Node_Str");
          }
        }
 else {
          Material mat;
          if (StringUtils.isNumeric(amountdata[0])) {
            mat=Material.getMaterial(Integer.parseInt(amountdata[0]));
          }
 else {
            mat=Material.getMaterial(amountdata[0].toUpperCase());
          }
          if (amountdata.length == 2) {
            tempChest[i]=new ItemStack(mat,Integer.parseInt(amountdata[1]));
          }
 else           if (amountdata.length == 3) {
            tempChest[i]=new ItemStack(mat,Integer.parseInt(amountdata[2]),Short.parseShort(amountdata[1]));
          }
        }
      }
 catch (      java.lang.IllegalArgumentException ex) {
        ex.printStackTrace();
        getLogger().severe("String_Node_Str" + chestItemString[i]);
        getLogger().severe("String_Node_Str" + ex.getMessage());
        getLogger().info("String_Node_Str");
        for (        PotionType c : PotionType.values())         getLogger().info(c.name());
      }
catch (      Exception e) {
        e.printStackTrace();
        getLogger().severe("String_Node_Str" + chestItemString[i]);
        getLogger().info("String_Node_Str");
        for (        Material c : Material.values())         getLogger().info(c.name());
      }
    }
    Settings.chestItems=tempChest;
  }
 else {
    Settings.chestItems=new ItemStack[0];
  }
  Settings.endermanDeathDrop=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowEndermanGriefing=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowCreeperDamage=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowCreeperGriefing=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowTNTDamage=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowFireExtinguish=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowChestDamage=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowVisitorKeepInvOnDeath=getConfig().getBoolean("String_Node_Str",false);
  Settings.allowPistonPush=getConfig().getBoolean("String_Node_Str",true);
  Settings.allowMobDamageToItemFrames=getConfig().getBoolean("String_Node_Str",false);
  Settings.defaultWorldSettings.clear();
  Settings.defaultIslandSettings.clear();
  Settings.defaultSpawnSettings.clear();
  Settings.visitorSettings.clear();
  for (  SettingsFlag flag : SettingsFlag.values()) {
    Settings.defaultWorldSettings.put(flag,getConfig().getBoolean("String_Node_Str" + flag.name()));
    Settings.defaultSpawnSettings.put(flag,Settings.defaultWorldSettings.get(flag));
    if (getConfig().contains("String_Node_Str" + flag.name())) {
      Settings.visitorSettings.put(flag,Settings.defaultIslandSettings.get(flag));
      Settings.defaultIslandSettings.put(flag,getConfig().getBoolean("String_Node_Str" + flag.name(),Settings.defaultWorldSettings.get(flag)));
    }
 else {
      Settings.defaultIslandSettings.put(flag,Settings.defaultWorldSettings.get(flag));
    }
  }
  getChallenges();
  Settings.broadcastMessages=getConfig().getBoolean("String_Node_Str",true);
  YamlConfiguration blockValuesConfig=Util.loadYamlFile("String_Node_Str");
  Settings.deathpenalty=blockValuesConfig.getInt("String_Node_Str",0);
  Settings.sumTeamDeaths=blockValuesConfig.getBoolean("String_Node_Str");
  Settings.maxDeaths=blockValuesConfig.getInt("String_Node_Str",10);
  Settings.islandResetDeathReset=blockValuesConfig.getBoolean("String_Node_Str",true);
  Settings.teamJoinDeathReset=blockValuesConfig.getBoolean("String_Node_Str",true);
  Settings.underWaterMultiplier=blockValuesConfig.getDouble("String_Node_Str",1D);
  Settings.levelCost=blockValuesConfig.getInt("String_Node_Str",100);
  if (Settings.levelCost < 1) {
    Settings.levelCost=1;
    getLogger().warning("String_Node_Str");
  }
  Settings.blockLimits=new HashMap<MaterialData,Integer>();
  if (blockValuesConfig.isSet("String_Node_Str")) {
    for (    String material : blockValuesConfig.getConfigurationSection("String_Node_Str").getKeys(false)) {
      try {
        String[] split=material.split("String_Node_Str");
        byte data=0;
        if (split.length > 1) {
          data=Byte.valueOf(split[1]);
        }
        Material mat;
        if (StringUtils.isNumeric(split[0])) {
          mat=Material.getMaterial(Integer.parseInt(split[0]));
        }
 else {
          mat=Material.valueOf(split[0].toUpperCase());
        }
        MaterialData materialData=new MaterialData(mat);
        materialData.setData(data);
        Settings.blockLimits.put(materialData,blockValuesConfig.getInt("String_Node_Str" + material,0));
        if (debug) {
          getLogger().info("String_Node_Str" + materialData + "String_Node_Str"+ Settings.blockLimits.get(materialData));
        }
      }
 catch (      Exception e) {
        getLogger().warning("String_Node_Str" + material + "String_Node_Str");
      }
    }
  }
  Settings.blockValues=new HashMap<MaterialData,Integer>();
  if (blockValuesConfig.isSet("String_Node_Str")) {
    for (    String material : blockValuesConfig.getConfigurationSection("String_Node_Str").getKeys(false)) {
      try {
        String[] split=material.split("String_Node_Str");
        byte data=0;
        if (split.length > 1) {
          data=Byte.valueOf(split[1]);
        }
        Material mat;
        if (StringUtils.isNumeric(split[0])) {
          mat=Material.getMaterial(Integer.parseInt(split[0]));
        }
 else {
          mat=Material.valueOf(split[0].toUpperCase());
        }
        MaterialData materialData=new MaterialData(mat);
        materialData.setData(data);
        Settings.blockValues.put(materialData,blockValuesConfig.getInt("String_Node_Str" + material,0));
        if (debug) {
          getLogger().info(mat.toString() + "String_Node_Str" + Settings.blockValues.get(mat));
        }
      }
 catch (      Exception e) {
        getLogger().warning("String_Node_Str" + material + "String_Node_Str");
      }
    }
  }
 else {
    getLogger().severe("String_Node_Str");
  }
  Settings.biomeCost=getConfig().getDouble("String_Node_Str",100D);
  if (Settings.biomeCost < 0D) {
    Settings.biomeCost=0D;
    getLogger().warning("String_Node_Str");
  }
  String defaultBiome=getConfig().getString("String_Node_Str","String_Node_Str");
  try {
    Settings.defaultBiome=Biome.valueOf(defaultBiome);
  }
 catch (  Exception e) {
    getLogger().severe("String_Node_Str" + defaultBiome + "String_Node_Str");
    Settings.defaultBiome=Biome.PLAINS;
  }
  Settings.breedingLimit=getConfig().getInt("String_Node_Str",0);
  Settings.villagerLimit=getConfig().getInt("String_Node_Str",0);
  Settings.limitedBlocks=new HashMap<String,Integer>();
  Settings.entityLimits=new HashMap<EntityType,Integer>();
  ConfigurationSection entityLimits=getConfig().getConfigurationSection("String_Node_Str");
  if (entityLimits != null) {
    for (    String entity : entityLimits.getKeys(false)) {
      int limit=entityLimits.getInt(entity.toUpperCase(),-1);
      if (limit > 0) {
        getLogger().info(entity.toUpperCase() + "String_Node_Str" + limit);
      }
      if (Material.getMaterial(entity.toUpperCase()) == null) {
        EntityType type=EntityType.valueOf(entity.toUpperCase());
        if (type != null && type.isAlive()) {
          Settings.entityLimits.put(type,limit);
        }
 else {
          getLogger().warning("String_Node_Str" + entity.toUpperCase() + "String_Node_Str");
        }
      }
 else       if (limit > -1) {
        Settings.limitedBlocks.put(entity.toUpperCase(),limit);
        if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
 else         if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
 else         if (entity.equalsIgnoreCase("String_Node_Str")) {
          Settings.limitedBlocks.put("String_Node_Str",limit);
          Settings.limitedBlocks.put("String_Node_Str",limit);
        }
      }
    }
  }
  if (Settings.limitedBlocks.isEmpty()) {
    Settings.hopperLimit=getConfig().getInt("String_Node_Str",-1);
    if (Settings.hopperLimit > 0) {
      Settings.limitedBlocks.put("String_Node_Str",Settings.hopperLimit);
    }
  }
  Settings.mobLimit=getConfig().getInt("String_Node_Str",0);
  Settings.removeCompleteOntimeChallenges=getConfig().getBoolean("String_Node_Str",false);
  Settings.addCompletedGlow=getConfig().getBoolean("String_Node_Str",true);
  Settings.cleanRate=getConfig().getInt("String_Node_Str",2);
  if (Settings.cleanRate < 1) {
    Settings.cleanRate=1;
  }
  Settings.acidBottle=getConfig().getBoolean("String_Node_Str",true);
  Settings.minNameLength=getConfig().getInt("String_Node_Str",1);
  Settings.maxNameLength=getConfig().getInt("String_Node_Str",20);
  if (Settings.minNameLength < 0) {
    Settings.minNameLength=0;
  }
  if (Settings.maxNameLength < 1) {
    Settings.maxNameLength=1;
  }
  if (Settings.minNameLength > Settings.maxNameLength) {
    Settings.minNameLength=Settings.maxNameLength;
  }
  Settings.useMagicCobbleGen=getConfig().getBoolean("String_Node_Str",false);
  if (Settings.useMagicCobbleGen) {
    Settings.magicCobbleGenOnlyAtSpawn=getConfig().getBoolean("String_Node_Str",false);
    if (getConfig().isSet("String_Node_Str")) {
      Settings.magicCobbleGenChances=new TreeMap<Integer,TreeMap<Double,Material>>();
      for (      String level : getConfig().getConfigurationSection("String_Node_Str").getKeys(false)) {
        int levelInt=0;
        try {
          if (level.equals("String_Node_Str")) {
            levelInt=Integer.MIN_VALUE;
          }
 else {
            levelInt=Integer.parseInt(level);
          }
          TreeMap<Double,Material> blockMapTree=new TreeMap<Double,Material>();
          double chanceTotal=0;
          for (          String block : getConfig().getConfigurationSection("String_Node_Str" + level).getKeys(false)) {
            double chance=getConfig().getDouble("String_Node_Str" + level + "String_Node_Str"+ block,0D);
            if (chance > 0 && Material.getMaterial(block) != null && Material.getMaterial(block).isBlock()) {
              chanceTotal+=chance;
              blockMapTree.put(chanceTotal,Material.getMaterial(block));
            }
          }
          if (!blockMapTree.isEmpty()) {
            Settings.magicCobbleGenChances.put(levelInt,blockMapTree);
          }
        }
 catch (        NumberFormatException e) {
          getLogger().severe("String_Node_Str" + level + "String_Node_Str");
        }
      }
    }
  }
  Settings.disableOfflineRedstone=getConfig().getBoolean("String_Node_Str",false);
  Settings.fancyIslandLevelDisplay=getConfig().getBoolean("String_Node_Str",false);
  return true;
}