Get a new boyfriend.
You should not have to make anyone be nice to you. If he is not nice to you trust me, he will not change and you cannot make him.... <br />
If he's not being nice to you simply because he's your boyfriend, there's NOTHING you can do. Time to move on.
Dump him and find a new one. The old one is obviously not working right. The warranty is probably up and you can't get it fixed, so it is easier just to get a replacement. Would you keep anything else that didn't do what it was supposed to do? Would you keep an article of clothing that just didn't fit you anymore? Would you eat food that had obviously spoiled? No, no, and no again. So why do it with BF?
He's not being nice to you? Is he having a hard time with something? If this is how he usually is it's time to move on.