noPhantomsPlugin
This short & simple plugin for Spigot and Bukkit servers prevents Phantoms from spawning.
Download the .jar: https://github.com/HerrEurobeat/noPhantomsPlugin/releases/latest
...and put it into the plugins
folder of your Spigot/Bukkit server. Done!
This plugin was tested on 1.16 - 1.19 but should also work on other versions.