Um, here's a nasty little trick.
If you have a terrace farm, Cider Mill, or any special production building, set it to the Medal or supply production and dont collect from it. Somebody will come through and plunder it only to find a medal and instantly get mad. It wont prevent them from plundering you but if they waste their plunder on a medal that keeps them from taking your other productions. After they catch onto your idea you can set it back to FPs. It wont stop them but it will keep your valuable buildings safe and get back at the aggressor. Its also nice because the supplies/medals productions usually only take less than 4 hours so it can be done several times. Pass this on to your "friend"
The problem with that idea is you take the fp's (or Goods) away from yourself setting the trap. If you do it to more than one building, you end up costing yourself more than they could possibly plunder.
Other People have mentioned the basics (collect on time, etc, etc...) but here are some other options.
First thing, always attack back. Even if you lose horribly, attack back. Some people respect that (some don't) and might stop. Could even make a friend if you have a FR available.
Try communication. We are social creatures and most of us like to interact with each other. Don't whine, cry, complain or be a jerk about the plunder, that will just make it worse, I assure you. Don't ask them to stop either, just try and make a funny. My old go to (before I was the Ogre on the block), was to ask what kind of cookies they wanted me to leave out for their next visit. I've even commented on their names if I recognized it from a book or other media. If someone with a Game of Thrones name as their own hits you, tell them how much you liked the show/books, lie if you gotta, just find a connection. Again, could make a friend.
Try Aiding before they hit you. Many people Aid from TH and after they do, they can't attack you. Obviously if they keep hitting you, stop Aiding them. I know that now days I usually attack and plunder people cause they didn't Aid me. When I was a lil guy, I always Aided the top ten out of respect (and fear, lol), so I kinda expect the same.
Sick a Guildmate on them if possible. I know when someone in my Guild mentions they got hit and the attacker is in my Hood, I bring the pain (if I can, sometimes the pain gets brought to you, lol).
Lastly, and this one ain't painless, simply ask them what the price of protection is. Between a few FP's on a GB and some Aid, you might bribe your way out. Not ideal, but if he's pummeling you and getting the stuff anyway, this might cost you less.
None of these are sure fire in anyway, just extra options in case the basics aren't working. Good luck.