Nicky Walker also threatened to murder the mother of his child during a separate offence in which he breached a non-molestation order.
Leeds Crown Court heard Walker went to Brudenell Social Club, Burley, with a group of his friends on September 5 last year.
Ayesha Smart, prosecuting, said members of the group failed to abide by social distancing measures which had been implemented and were asked to leave.
The 24-year-old refused to leave and was forcibly ejected by security staff just after midnight.
The defendant tried to fight with security staff and threatened to pull out a knife, saying: "I will do you."
Police were called and Walker was arrested and searched.
A lock knife was found along with two small bags of cannabis in a man bag he had been carrying.
Ms Smart said Walker and the woman have a child together but their relationship broke down in 2018 after he became violent towards her.
The defendant was made the subject of a restraining order which expired on September 10 last year.
After the expiry of the order he began contacting the woman again.
She then obtain a non-molestation order in which Walker was forbidden from threatening her with violence or going within 100 metres of her home.
The woman received a phone call on October 3 from a withheld number but recognised Walker's voice.
He called the victim a "snitch" and said: "You think you are safe. I will murder you."
Walker added: "When I see you I'm going to smash your face in."
Walker, of Lincombe Bank, Gledhow, pleaded guilty to possession of a blade, threatening behaviour, possessing cannabis and breach of a non-molestation order.
Ms Frith said Walker did not take out the weapon during the incident at the social club.
She added: "He is incredibly immature and does accept that he needs help with emotional intelligence."
Judge Mushtaq Khokhar jailed Walker for 16 months.
The judge said: "You know how people are conducting themselves at the moment - how frightened they are of the infection.
"Yet you were not maintaining social distancing in this club and security staff intervened.
"I accept that there was no immediate danger to security staff but, nevertheless, the threat you made must have concerned them enough to ring police and tell them you had a knife."