I agree what everyone wrote. Also i think in your situation he is stress because of parasites so he might even bite the tail because of that. For now is most important to get rid of the parasites sense it can be fatal. And then like everyone wrote with clean water hopefully he will get better. Sometimes i think you can't stop it...but you need to keep it from being infected.
After you done treating him with aq salt and then you need to wait make sure he don't have it … And when you sure he is cleared you can add plants, or ''toys'' such as a bottle cap lid, or ping pong ball..good food..