Jarret Stoll has reached a plea deal in connection with his April arrest in Las Vegas.

Stoll pleaded guilty to two misdemeanors - one count for provoking commission of breach of peace and one count for trespassing - after prosecutors agreed to dismiss his felony cocaine charge, according to ESPN.

The Los Angeles Kings player was arrested on April 17 at the MGM Grand's Wet Republic pool complex when he was found in possession of cocaine and MDMA. The Clark County DA charged him with one felony count of cocaine possession, which carried a possible four-year sentence with it, on June 22.

Stoll, the boyfriend of Erin Andrews, will have to complete 32 hours of community service within 120 days and appear in court on Aug. 27 to update a judge on his progress. He will work with the Salvation Army and organize a hockey program for at-risk youth in the Las Vegas area.

"Now that the case has been resolved, I am committed to meeting all of my obligations to the court and am grateful for the chance to offer guidance and share positive life lessons to kids as part of the resolution of this matter," Stoll said in a statement (via ESPN). "My focus remains on hockey, and I am looking forward to getting back on the ice next season."

With the felony drug charge dismissed, the 33-year-old native Canadian shouldn't have to worry about his immigration status being jeopardized.