A homeless man who used to help people in the same situation was caught with drugs in Mansfield town centre, a court heard.
Wayne Pitchfork was spotted by a town warden taking drugs in a shop doorway, where he had been sleeping, near the Bank of Scotland, Westgate, at 10am on March 19.
He became abusive to the police officer who asked him to move on, and was sick on the pavement, said prosecutor Robert Carr.
Two small bags of amphetamine were found on him at the police station.
The court heard he was given a conditional discharge for a public order offence, on March 5.
Donna Pursglove, mitigating, said: “In the past he worked with homeless people trying to find accommodation for them in the Scarborough area.”
She said he moved to the Mansfield area to be closer to family, but became associated with people who took advantage of him, and this led to him losing his home.
“He knows of the dangers of being homeless,” Ms Pursglove said. “He uses amphetamine to stay awake.”
She said he suffers from trenchfoot, which makes it difficult for him for him to walk and “get out of the centre in time.”
Ms Pursglove said banning him completely from the town centre would be “too harsh” as he needs to access soup kitchens and support agencies.
Pitchfork, 43, admitted possession of the Class B drug and disorderly conduct, when he appeared at Mansfield Magistrates Court, on Friday.
He was told to make “alternative arrangements” to sleep outside the inner ring road, by magistrates.
He was given a one year community order, and must attend 15 days of a rehabilitation programme. He was ordered to pay a £50 government surcharge.
Read more of the latest cases from Mansfield Magistrates Court here.