A man went on a drunken rampage attacking people at random with a piece of wood after he was mugged in a nightclub.
Mark Smith picked a table leg out of a skip before using it as a weapon to attack people in Pontefract town centre.
A court heard Smith was caught on camera approaching one man and hitting him seven times with the piece of wood.
CCTV footage showed Smith picking up the weapon outside Big Fellas nightclub and using it to cause damage to an Audi car during the incident in May 2017.
Giles Bridge, prosecuting, said Smith then went into Beastfair and attacked a man as he was standing in a doorway.
The defendant walked back to the nightclub and approached a man and a woman near to the entrance
He swung the weapon at the man, striking him to the body and knocking him to the ground. The man suffered injuries to his arm.
Read more: Drunk caused scare as he walked topless down street in Leeds clutching bread knife
Smith then lifted a moped up off the ground before putting it back down.
He said to the woman: "Do not move a muscle or I will kick the s*** out of you."
Mr Bridge said Smith approached three others in the area while still holding the weapon and was involved in a "scuffle" with another man.
Smith was arrested in the area at 1am.
He refused to comment when interviewed about the incident.
Smith, 38, of Kingsley Road, Middleton, Greater Manchester, pleaded guilty to threatening a person with an offensive weapon and criminal damage.
He has previous convictions for assault and criminal damage.
In March this year he was given an 18-month prison sentence for supplying drugs in Glasgow.
Read more: Former soldier in dangerous high speed police chase through Leeds
Eddison Flint, mitigating, said Smith had been working in Pontefract for a building firm at the time of the incident.
He had been in the nightclub earlier in the evening with his workmate and two women.
Mr Flint said: "As soon as he got to the nightclub his colleague went to get a drink from the bar and he (Smith) went to the toilets.
"When he came out he had his jumper pulled over his head.
"He was attacked and taken to the floor. When he awoke he was at the back of Big Fellas nightclub.
"His car keys, wallet and all his possessions had been taken."
Mr Flint added: "That is when he picked up the table leg.
"He was angry and regrets the way he reacted because of poor reasoning and the consumption of a lot of alcohol.
"His recollection is somewhat hazy."
Smith was jailed for 12 months.
Judge Simon Phillips, QC, said: "I accept that you did not set out that evening to act in a violent way, but you are responsible for your actions which were utterly unwarranted and unprovoked."