During a confrontation with police, a man allegedly threw a pineapple at officers and armed himself with a rope whip.