A mamba-smoker who carried out a "dirty protest" in a Mansfield police cell said he was "trying to attract the officer's attention", a court heard.
Craig Hodson's ex-partner contacted police after he turned up at her address in Worksop behaving "oddly" and officers realised he had been smoking the drug, on August 19.
He used his clothing to carry out the dirty protest and it cost £150 to deep clean the cell, said prosecutor Sarah Sanderson.
She said he received a suspended prison sentence for battery on April 19, 2018, and breached the the restraining order, which bans him from contacting the woman, twice within five days.
He was jailed for eight weeks last December for a third breach of the order, she added.
Ian Pridham, mitigating, said Hodson was under the influence of drugs at the time, but had been invited around to the address.
"He simply says he was trying to attract the officer's attention," he said.
"When I attended he was in quite a state, and so was the cell. He is a bit ashamed of himself."
He said Hodson was fearful of a prison sentence because his grandmother, who he lives with, has been diagnosed with terminal cancer.
Hodson, 33 , of Chalmers Drive, Doncaster, admittted breaching a restraining order, criminal damage, and possession of a Class B drug, when he appeared at Mansfield Magistrates Court, on Wednesday.
He received a total of 22 weeks in prison.
For more of the latest court cases from Mansfield Magistrates Court, click here.