The plan, negotiated over several months by the company and the thousands of cities, counties, states and individuals suing the drugmaker, had received overwhelming support during the creditors’ vote. U.S. Bankruptcy Court Judge Robert D. Drain approved the plan, saying the settlement would resolve complex and protracted litigation, granting immediate monetary relief to the creditors. But nine states and a branch of the Justice Department contested it. Critics of the settlement terms argued that it offered the Sackler family members, who took billions from the company, protection without them declaring bankruptcy.