A Mansfield man sent abusive texts to his ex-girlfriend warning her to leave the Bellamy Road estate, a court heard.
Liam Burns sent the woman a text on January 4 which said: “Get out of Bellamy or else. I am your worst nightmare.”
Prosecutor Neil Hollett said Burns had been told not to send unwanted text messages to the woman in May last year by police, but there were further incidents in October and November.
He was arrested on January 6, but threw food at a CCTV camera while he was in the cell, and smeared the meal on the walls.
“He was annoyed about being kept in custody and was concerned about his dogs being left alone,” added Mr Hollett.
Burns, 24, of Newark Close, admitted harassment without violence and criminal damage, when he appeared at Mansfield Magistrates Court, on Wednesday.
Mary Dixon, mitigating, said Burns had been contacted by the woman and thought the relationship might be “on or off”, but she had said it was off.
“When in drink he texted her because he felt she was leading him on,” she said. “He accepts that the texts were unwanted and accepts that the relationship is over.”
He was given a 12 month community order, with 20 rehabilitation activity days to address drug, alcohol and anger management issues, and 40 hours of unpaid work.
He was banned from contacting the woman for 12 months and going to Thorney Court, on the estate.
He was ordered to pay an £85 government surcharge and £85 costs.