A "long-standing" Sutton drug addict has been given the chance to show he is serious about kicking his habit, a court heard.
Jamie Moore was found with amphetamine and the nerve drug Pregabalin when he was searched at Mansfield Police Station, on Wednesday.
The offences put him in breach of a community order, imposed on March 27, for criminal damage and theft, said prosecutor Donna Fawcett.
Moore's amphetamine habit was "broadly under control for five years" while he was in a relationship, but he was "hit hard" when that relationship broke down and he was denied access to his younger children, said Morgan Hogarth, in mitigation.
He said Moore used the Pregabalin to sleep after abusing the amphetamine, but now sought help from the probation service to tackle his problems.
The court heard he had "dropped off the probation service's radar" for between one and three months.
Moore, 36, care of Priestic Road, admitted possession of the drugs, and the breach, when he appeared at Mansfield Magistrates Court, on Wednesday.
District judge Jonathan Taaffe said: "If he's serious about complying we will give him the opportunity.
"I don't think he is. And if not - he will go to prison."
He told Moore: "You have sufficient rope to hang yourself - or you will show you want to coooperate."
Sentencing was adjourned for four weeks to see if Moore complies with appointments.