BELCHERTOWN, Mass. — A 19-year-old man has admitted to the armed robbery of a University of Massachusetts-Amherst student in February that triggered a campus lockdown.

The Boston Globe reports ( William McKeown, of Framingham, was sentenced Wednesday to one year behind bars followed by two years of probation. He pleaded guilty to larceny and assault and battery.

McKeown and co-defendant Shawn Wyatt, also of Framingham, attempted to pass off shredded vegetables as marijuana during a drug deal with a student on campus on February 18. A fight with the student ensued, and Wyatt struck the student with his fists and a BB gun. McKeown and Wyatt made off with $120.

Wyatt pleaded guilty in May to larceny and assault and battery with a dangerous weapon. He was sentenced to two years in prison.