Avenged Sevenfold

Context: In January 2009, M. Shadows confirmed that the band was writing the follow-up to their self-titled fourth album within the upcoming months. They also played at Rock on the Range, from May 16-17, 2009. On April 16, they performed a version of Guns N' Roses' "It's So Easy" onstage with Slash, at the Nokia Theater in Los Angeles. On December 28, 2009, the band's drummer James "The Rev" Sullivan was found dead at his home at the age of 28. Autopsy results were inconclusive, but on June 9, 2010, the cause of death was revealed to have been an "acute polydrug intoxication due to combined effects of Oxycodone, Oxymorphone, Diazepam/Nordiazepam and ethanol". In a statement by the band, they expressed their grief over the death of The Rev and later posted a message from Sullivan's family which expressed their gratitude to his fans for their support. The band members admitted in a number of interviews that they considered disbanding at this point in time. However, on February 17, 2010, Avenged Sevenfold stated that they had entered the studio, along with now-former Dream Theater drummer Mike Portnoy, to drum for the album, in place of The Rev.  The single "Nightmare" was digitally released on May 18, 2010. A preview for the song was released on May 6, 2010 on Amazon.com, but was removed soon after for unknown reasons. Mixing for the album had been completed in New York City, and Nightmare was finally released worldwide on July 27, 2010. It met with mixed to positive reviews from music critics but was well received by the fans. Nightmare beat sales projections easily, debuting at number one on the Billboard 200 with sales of 163,000 units in its first week. After finishing recording, in December, Portnoy and the band posted simultaneous statements on their websites stating that he would not be their replacement for The Rev. However, Portnoy did travel with the band overseas in December 2010 for three shows in Iraq and Kuwait sponsored by the USO. They played for U.S. Soldiers at Camp Adder, Camp Beuhring, and Balad Air Base. On January 20, 2011, Avenged Sevenfold announced via Facebook that former Confide drummer Arin Ilejay would begin touring with them that year. He was not yet considered a full-time member at this point.  Avenged Sevenfold performed at the Rock am Ring and Rock im Park festivals on June 3-5, 2011 alongside other bands such as Alter Bridge, System of a Down, and In Flames. On April 2011, the band headlined the Golden God Awards held by Metal Hammer. The same night the band won three awards for "Best Vocalist" (M. Shadows), "Epiphone Best Guitarist(s)" (Synyster Gates and Zacky Vengeance) and "Affliction's Album of The Year: " for Nightmare, while Mike Portnoy won the award for "Drum Workshop's Best Drummer" for his work on the album.  Avenged Sevenfold headlined the 2011 Uproar Festival with supporting acts Three Days Grace, Seether, Bullet for My Valentine, Escape The Fate, among others. In November and December 2011, the band went on their "Buried Alive" tour with supporting acts Hollywood Undead, Asking Alexandria, and Black Veil Brides. CANNOTANSWER

Question: Tell me more about what  happened to Avenged Sevenfold, The death of The Rev and Nightmare in 2009-2011?
Answer: In January 2009, M. Shadows confirmed that the band was writing the follow-up to their self-titled fourth album within the upcoming months.