It happened at the Northfield Hall Community Centre on March 10, 2020.
A gun was fired and a 12-year-old boy was shot.
He suffered facial injuries.
Jordan Kelly, 18, from Huddersfield, was jailed for six years on Friday, August 27 at Leeds Crown Court after pleading guilty to possession of a firearm with intent to cause fear of violence and perverting the course of justice.
Meanwhile, two other people who were dealt with in separate criminal proceedings, were also sentenced at Leeds Crown Court for offending aimed at assisting Kelly evade justice.
John Foggo, 40, was sentenced to four years in prison after being found guilty of perverting the course of justice and assisting an offender.
Sarah Nixon, 37, was given a suspended 18 month sentence after being found guilty of perverting the course of justice.
DCI Vanessa Rolfe of the Homicide and Major Enquiry Team, who led the enquiry, said: “The shooting of this 12-year-old was an appalling act which could very easily resulted in him losing his life.
“He did suffer facial injuries which required lengthy hospital treatment, and I am pleased to have seen Kelly admit his role in what took place and be jailed for a number of years.
“The convictions of Foggo and Nixon should serve as a warning that attempting to help someone evade justice has consequences and authorities will prosecute those who engage in this activity.”
She added: “The firearms discharge itself remains under investigation and we remain committed to bringing the other parties involved in this very serious incident to justice.
“I would like to use this sentencing as an opportunity to re-iterate our appeals to the community for anyone who can assist our ongoing enquiries to come forward. Information can be given directly to HMET, online via the force website or anonymously to the independent Crimstoppers charity.”
Chief Superintendent Julie Sykes, District Commander of Kirklees Police, said: “The firearms discharge outside Northfield Hall in March 2020 caused widespread shock and anger in Huddersfield and led to a lengthy police investigation.
“A huge amount of work has been undertaken by Kirklees Police with our partners in specialist teams such as HMET and the Firearms Prevent Team to combat gun violence in our District in recent years and those investigations have resulted in many convictions and falls in firearms offending.
“Our work remains an ongoing process and I continue to appeal to communities to stand up for their local area and share information they have about gun crime.
“Kirklees Police can be contacted directly through 101 or www.westyorkshire.police.uk/101livechat Calls can also be made direct to Crimestoppers in complete anonymity on 0800 555 111. “