is it legal for someone to say they dont want someone near their kid in divorce/custody papers?
Yes, it is legal to make such a request of the court; the court may or may not grant the request depending on whether that "someone's" presence near the child, could be harmful or not. The normal Family Law criteria; "best interests of the child" standard applies.