The null check is pointless, do the same style as you did with ally, erm.
html.replace("%Clan%", player.getClan() != null ? player.getClan().getName() : "<font color=FF0000>No</font>");
html.replace("%Alliance%", (player.getClan() != null && player.getClan().getAllyId() > 0) ? player.getClan().getAllyName() : "<font color=FF0000>No</font>");