Hi Chrissy,
I don't know anything about restraining orders either. But I would start by talking with your landlord. He should know that if he allows your X into the building that 1) there will likely be drama over it (whether initiated by you or not), and 2) you will likely be moving out. So, he would not be gaining anything by renting this other apt to your X. He would just be swapping a good non-addicted tenant for a potentially unpredictable addicted one. Doesn't seem like a good option to me.
Take care,
Fathom