NEW BRUNSWICK, N.J. — A former high school baseball coach who sent sexually explicit text messages to several teenage players won’t have to serve any more jail time.

Bartholomew “Bart” McInerney also won’t have to register as a sex offender under the sentence imposed Friday.

McInerney pleaded guilty to child endangerment last month in a deal with Middlesex County prosecutors. That came just weeks before he was due to stand trial again.

Prosecutors say they made the deal because the victims wanted closure in the matter.

McInerney, who coached at St. Rose High School in Belmar, was convicted in January 2010 and sentenced to 18 years. But a state appellate court overturned the conviction in 2012, finding the trial judge had given confusing or inadequate jury instructions.

During his trial, nearly a dozen players testified McInerney offered them cash for texts describing masturbation.