@SuppressWarnings("deprecation")
  public void loadAllBarriersToGame() {
    CustomConfig conf = plugin.configManager.getConfig("ArenaConfig");
    barriers.clear();
    try {
      for (String key : conf.getConfigurationSection(game.getName() + ".Barriers").getKeys(false)) {
        double x = conf.getDouble(game.getName() + ".Barriers." + key + ".x");
        double y = conf.getDouble(game.getName() + ".Barriers." + key + ".y");
        double z = conf.getDouble(game.getName() + ".Barriers." + key + ".z");
        Location loc = new Location(game.getWorld(), x, y, z);
        int number = Integer.parseInt(key);
        Barrier barrier = new Barrier(loc, loc.getWorld().getBlockAt(loc), number, game);

        loc.getBlock().setTypeId(conf.getInt(game.getName() + ".Barriers." + key + ".bb"));

        double rx = conf.getDouble(game.getName() + ".Barriers." + key + ".rx");
        double ry = conf.getDouble(game.getName() + ".Barriers." + key + ".ry");
        double rz = conf.getDouble(game.getName() + ".Barriers." + key + ".rz");
        barrier.setRepairLoc(new Location(game.getWorld(), rx, ry, rz));

        SpawnPoint point =
            game.spawnManager.getSpawnPoint(
                conf.getString(game.getName() + ".Barriers." + key + ".sp"));
        barrier.assingSpawnPoint(point);

        barrier.setReward(conf.getInt(game.getName() + ".Barriers." + key + ".reward"));

        barriers.add(barrier);
      }
    } catch (NullPointerException e) {
    }
  }