Psychic Powers and the Kevatta Sutta (DN 11)
There are 2 things here.


developing supernormal powers
displaying supernormal powers


Developing supernormal powers as side benefit of meditation is welcome and long as they are used to teach and further the understanding of the Dhamma. E.g. Meditation master using though reading to see if the partitioner has understood the instructions. Also when meditating you goal should not be to be after these powers but just to realise the Dhamma but have them developed as a side benefit.

Displaying the powers for vanity is what is not encouraged.