Jonathan Nicholson left his victim with a three-inch wound to the head during the Mad Friday attack in Vagas Bar.
The victim later said he "felt lucky" that he had not been more seriously injured as he was facing away from Nicholson as he played a pool shot at the time.
Leeds Crown court heard the incident happened at 10.30pm on December 21 last year.
The victim had gone into the bar with two friends to drink and play pool.
CCTV footage played in court showed Nicholson pick up a glass and go to attack the victim without warning.
He told one of the victim's friends "your mate is going to get it" before hitting him with the glass.
Nicholson then picked up a pool ball and went to attack the victim again but was stopped by others.
The victim was taken to Pinderfields Hospital where he had the wound glued.
He admitted carrying out the attack after being shown the CCTV footage by police.
Nicholson, 30, of Makin Street, Wakefield, pleaded guilty to unlawful wounding.
He has previous convictions for affray and possessing an offensive weapon.
A statement was read to the court on behalf of the victim. He said: "I consider myself lucky because I was bent down taking a shot on the pool table.
"My head was facing facing away. It could have been a lot worse."
He was given a 16-month prison sentence, suspended for two years, and ordered to take part in a 30-day rehabilitation programme.