Example #1
0
  public Boss newBoss(Boss b) {
    String boss = b.getConfigName();
    bosses.remove(boss);
    bossNames.remove(boss);

    FileConfiguration config = plugin.getConfigManager().getConfig("maps.yml");
    ConfigurationSection section =
        config.getConfigurationSection(plugin.getMapManager().getCurrentMap().getName());
    ConfigurationSection sec = section.getConfigurationSection("bosses");

    Boss bb =
        new Boss(
            boss,
            sec.getInt(boss + ".hearts") * 2,
            sec.getString(boss + ".name"),
            Util.parseLocation(
                plugin.getMapManager().getCurrentMap().getWorld(), sec.getString(boss + ".spawn")),
            Util.parseLocation(
                plugin.getMapManager().getCurrentMap().getWorld(), sec.getString(boss + ".chest")));
    bosses.put(boss, bb);

    return bb;
  }