Prolific offender Dean Watson, of Monk Bretton, was arrested on Sunday May 5 in the Superdrug shop on Cheapside after reports of threatening and racist behaviour towards staff.
The 38-year-old was arrested again in the town centre on Saturday October 5, and was taken to hospital.
Sergeant Stephanie Coverley said: “Officers took Watson to Barnsley Hospital to be checked over by A and E staff after he was found intoxicated.
“While in the hospital, Watson became abusive and spat at officers. Watson was also using foul and inappropriate language in front of other patients and NHS staff, in what should be a safe and reassuring place for them.”
He was sentenced to 54 weeks in prison at Barnsley Magistrates’ Court.
Watson will also be subject to a criminal behaviour order (CBO) for three years, meaning he cannot enter the Public Space Protection Order area of Barnsley town centre, or sit or lie on the ground in any public place in the borough.
Sgt Coverley said: “This has been the second sentencing this week of offenders assaulting our officers. I hope this sends a strong message that this behaviour will not be tolerated and we will always seek prosecution.
“Our team are committed to making Barnsley Town Centre a safer, more enjoyable place to visit. We will continue to take action against those who act in an anti-social manner.”