The secret for stopping your parrot from pooping on you is not to have him on you in the first place. Parrots tend to poop every ten to 30 minutes, depending on the species.
By keeping in tune with their natural body schedule, you can reduce that pooping tendency on you. So, rather than trying to specifically teach the bird not to do that or punishing it, which you shouldn't do, the best strategy is to just be aware of how frequently your bird has to go.
Maybe leave it on its perch. And when it go, when you've seen your bird poop, that's a good time to pick it up. Not only are you rewarding it for going on its perch, you're also ensuring yourself that you've got at least ten to 30 minutes that you can handle your bird without another pooping.
Then five to ten minutes before you expect your bird to go again, just put it back on its perch and wait for it to go. That's a fail-safe strategy and that will keep your shirts clean and your floors from getting dirty. That's how you teach your parrot not to poop on you.