Maybe. OTOH the courts might find that the Book of Discipline is a type of contract that the UMC is following selectively. Question -did you find out from the judge what he/she will rule?
The episcopal have already been through this