Exemplo n.º 1
0
 public void update(Boss boss, IronGolem g) {
   boss.setHealth((int) g.getHealth());
   g.setCustomName(
       ChatColor.translateAlternateColorCodes(
           '&', boss.getBossName() + " &8» &a" + (int) boss.getHealth() + " HP"));
   bossNames.put(g.getCustomName(), boss);
   bosses.put(boss.getConfigName(), boss);
 }
Exemplo n.º 2
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;
  }