Daniel Takutai Te Atawhai Edwards became abusive and furious when police were called after he was seen tampering with a car.
He was in a supermarket car park on October 14 when a member of the public saw him trying to break into a black Subaru Legacy with a screwdriver.
The police were called.
When they arrived Edwards became abusive and physical.
He pleaded guilty yesterday to resisting police and language offences.
Lawyer Harete Hipango said the car was his brother's, and he was trying to force it open because the keys were locked inside. He was furious with police for stopping him when he hadn't done anything unlawful.
Judge Dugald Matheson said if he had seen someone driving away in a car after forcing entrance to it, he would have the same reaction as the member of the public, and want police to come and check it out.
"What followed probably doesn't put you up in the best speaker in the world.
"That was appalling language," he said.
Edwards was sentenced to 60 hours' community work.