An action for a nuisance may be maintained in any case where such an action might have been maintained under the laws in force immediately before the taking effect of article seventh of title one of chapter fourteenth of the code of civil procedure as added thereto by chapter one hundred seventy-eight of the laws of eighteen hundred eighty. A person by whom the nuisance has been erected and a person to whom the real property has been transferred may be joined as defendants in such an action. A final judgment in favor of the plaintiff may award him damages or direct the removal of the nuisance or both. This section does not affect an action wherein the complaint demands judgment for a sum of money only.
N.Y. Real Prop. Acts. Law § 841