No, the Bible itself says this is not the way to do it. We’re not arrogant, hypocritical or smugly self-righteous because we object to his self centered public rantings.
Maybe the pastor had seen enough disrespect for the church and felt the need to put an end to it.
Perhaps those, unlike you, who are imperfect souls needed a kick in the keester.
I will give the pastor the benefit of the doubt.