A man in his 30s was taken to hospital after being attacked in Selby town centre, police said.