"Don't mess this up," the judge warned him about his plea deal amid his divorce from Mackenzie Edwards.
Embattled "Teen Mom" star Ryan Edwards avoided jail time by pleading guilty to harassment in a Tennessee court on Tuesday.
As part of his plea deal, additional charges of possession of drug paraphernalia, possession of a controlled substance and stalking were all thrown out, as Edwards was given a suspended 11-month 29-day sentence and placed on probation. He was released on $55,000 bond.
He's also been ordered to wear a GPS monitoring device while on probation and must enter a rehab center in Austin, Texas for at least 45 days. "Forty-five days is not going to do anything but detox you," Judge Gary Starnes told the reality star in court, according to the Chattanooga Times Free Press. "You need to stay down there between six months to a year."
"Don't mess this up. I will not hesitate to revoke your probation," he also warned, before adding that Edwards is to have no contact with the victim, estranged wife Mackenzie Edwards, who filed for divorce earlier this year. "No contact with the victim. No social media relating to this victim," Starnes told Edwards, "You're all over the news. Everything you say or do on there is going to be published, OK?"
He also reportedly told Edwards not to respond to any messages posted about himself on social media.
Ryan Edwards' Text Messages That Landed Him in Jail Revealed, Per Legal DocsView Story
In February, Ryan was arrested in Hamilton County, Tennessee after allegedly breaking an order of protection granted to Mackenzie. He is said to have shared revealing pictures of her online and accused her of infidelity.
According to a press release via the Hamilton County Sheriff's Department, the 35-year-old violated the order by speaking with her father after it was issued. The Sheriff's Office also found he had an active warrant for harassment -- with Mackenzie listed as the victim -- before they arrested him at his place of employment. Ryan is said to have been found "to be in possession of drug paraphernalia and two bags of suspected narcotics" when he was arrested.
Mackenzie later filed for divorce, as the 26-year-old was also granted a restraining order in addition to temporary custody of their two kids: Jagger, 5, and Stella, 2. Two days later, Edwards was taken into custody again for stalking and violating an order of protection.
In addition to his two children with Mackenzie, Edwards also shares son Bentley with "Teen Mom" star Maci Bookout.