I have recently heard the claim that sun can not be composed of plasma because plasma can not be a black body.

I am an uneducated layman, I've seen a lot of people (laymen) deviate from accepted scientific consensus. I am skeptical and I don't have enough knowledge about physics to argue it.