Any person having charge of any vessel who shall refuse or neglect to obey the directions of the harbor masters, or either of them, in matters within their authority to direct, or any person who shall resist or oppose the harbor masters, or either of them, in the execution of the duties of their office, shall be liable to a penalty of fifty dollars for each offense to be recovered with costs of suit in the name of the state treasurer. All such penalties, when collected, shall be paid to the state treasurer.
N.J.S. § 12:9-7