/**
   * Updates the stats of a player based on their current attributes
   *
   * @param data player to update
   */
  public static void updatePlayer(PlayerData data) {
    Player player = data.getPlayer();
    if (player != null) {
      double change = updateStat(data, AttributeManager.HEALTH, player.getMaxHealth());
      data.addMaxHealth(change);

      change = updateStat(data, AttributeManager.MANA, data.getMaxMana());
      data.addMaxMana(change);
    }
  }