York County Sheriff's Office: Man attempted 'suicide by cop' in York