A plea for help was heard at the Whanganui District Court on Tuesday - when a man confessed "I'm on crack - I need help" in open court.
Robert John Barnes pleaded guilty to two counts of unlawfully being in an enclosed yard and two counts of unlawfully interfering with a motor vehicle.
Judge Philip Crayton asked defence lawyer Debbie Goodlet "what has been the underlying driver for Mr Barnes committing these crimes?"
Goodlet said it was probably previous alcohol issues, to which Barnes piped up and said "It's P, I'm on crack and I need help."
The judge responded by saying he was pleased Barnes wanted to address his problem but if he didn't, prison would be the only option.
"If the problem is not addressed it becomes a quick cycle where Mr Barnes is in and out of prison.
"Undoubtedly his addiction is causing him stress, the sooner we can address it the better." Judge Crayton said.
Barnes was convicted and sentenced to 50 hours of community work with 12 months intensive supervision where he will get counselling for alcohol and drug addiction.