Jalaluddin Khojandi, 26, pleaded guilty to first-degree attempted assault, District Attorney Thomas Spota said.
In addition to serving time at an upstate correctional facility, Khojandi will serve 5 years' post-release supervision; a permanent order of protection also was issued for the victim, Spota's office said in a news release.
Prosecutors said Khojandi attacked Michael Hargreaves, 40, on July 31, 2011, after Hargreaves performed at a tavern in Bayport. Khojandi was angry because a woman with whom he had a relationship had attended the performance, according to the news release.
Hargreaves had a skull fracture and head cuts, authorities said.