'You could have died or suffered serious head trauma,' judge tells man