A man has been treated in hospital after being assaulted in a North Yorkshire bar.