North Yorkshire Police applied for the Criminal Behaviour Order against Emlyn Thomas, 37, and told York Magistrates' Court that alcohol was an aggravating factor in the offences.
For the next five years, Thomas, of Clifton in the city, is banned from:
*Entering any on-licenced premises in the city of York
*Drinking in any public place in the city
*Possessing an open container of alcohol in the city
*Being drunk and disorderly or incapable in a public place
*Entering any commercial premises he is banned from, or remaining on commercial premises after he has been asked to leave
Under the order the boundaries of the city are defined as the A1237 and A64.
If Thomas fails to comply, he can be arrested and returned to court to face further charges.
After the hearing, Sgt Andy Walker said: “We, in the York Community Safety Hub, have worked with other local services to address this with a mixture of support and legal action against Thomas.
“York is a safe city and we want to ensure it remains a pleasant place for people to live, work and visit. Thomas’ behaviour undermines this and the order put in place by the courts sends out a clear message that it won’t be tolerated.”