Ethan Alexander Georgeson admitted common assault and threatening behaviour.
He will be sentenced on June 18 in summary court.
Prosecuting advocate Hazel Carroon told the court that Georgeson was at the Haven pub in Port Erin on March 15, at 9pm.
He was said to have been asked to leave by staff, but refused and attempted to punch the bar manager when he also asked him to go, but missed, lost his balance, and fell over.
Georgeson then spat at the manager, three or four times, and aimed an offensive racial slur at the individual.
The spittle landed on the man’s t-shirt and Georgeson was restrained by members of the public.
He was subsequently arrested and during an interview at police headquarters, answered ‘no comment’ to all questions.
The court heard that Georgeson, who lives at Queen's Road in Port St Mary, is awaiting sentence at the Court of General Gaol Delivery, on June 17, for supplying cocaine, after he was arrested as part of the police ‘Operation Nightjar’.
Defence advocate James Peterson said that his client may have trouble paying a fine for the latest offences, if he is jailed in June, so it may be preferable to adjourn sentencing until after that.
Deputy High Bailiff Rachael Braidwood adjourned sentencing for the assault and threatening behaviour until June 18.
Bail continues.