The governing body of any municipality may make, amend, repeal and enforce ordinances to regulate buildings and structures and their use and occupation to prevent and abate conditions therein harmful to the health and safety of the occupants of said buildings and structures and the general public in the municipality.
N.J.S. § 40:48-2.12a