How to stop allowing yourself to be used for sex?

Seems like a pathetic question, I know, but I’ve had this fuck buddy for about a year now. I know I like him and he doesn’t feel the same (we’ve spoken about it) but I continue to allow him to use me for sex (I only say use because that’s how it feels; he sleeps with other people and sometimes will ignore my texts after initiating the conversation etc). Anyway I was wondering what it takes to pull yourself together and get out of this situation - can it really be done by just shifting mindset or should I get with someone else to get over him? If anyone’s been in that situation I’d love to hear your advice.
How to stop allowing yourself to be used for sex?
Post Opinion