A DuPage County, Illinois judge has barred a suburban Chicago-area student from playing violent video games during his home detention at the State's Attorney's request, after the 16-year-old made threats to commit a school shooting.

The Chicago Tribune reports on the case of the unnamed Lake Park High School student, who was allegedly playing a violent game in a February 23 Snapchat post where he wrote, "Y’all need to shut up about school shootings or I’ll do one."

A DuPage County state's attorney spokesperson confirmed to Ars that Assistant State's Attorney Louisa Nuckolls made a motion to bar the student from social media and violent video games as a condition of his release into home detention. Judge Robert Anderson overruled an objection from the student's public defender and admonished the parents, according to the spokesperson, assigning them responsibility for "keeping him off those games."

"You can play all the Mario Kart you want," the judge told the student.

The spokesperson told Ars that the video game ban "is not a punishment per se," but merely an "extra precaution" to help "ensure that he has a successful home detention." The county does not usually seek these kinds of restrictions in juvenile cases as a policy, the spokesperson said, but it was sought in this case because of the nature of the allegations and the circumstances of the case.

"I'm not an expert on video games, but I know in a lot of those games they can communicate to each other," the spokesperson told Ars. "Again, it's an extra precaution."

The defendant in the case will appear in court to face two counts of disorderly conduct on March 12. While the gaming and social media restrictions could be discussed at that hearing, the spokesperson said the state's attorney's office will seek to keep them in place for the duration of his home detention.

"With fear in our classrooms, teachers can’t teach and students can’t learn," the state's attorney's office said in a statement. "The case against this student epitomizes the need for parents to be involved and to monitor their children's social media use."

The judge's order comes as politicians from President Trump on down have revived public debate over the effect of video game violence on children, following a shooting that killed 17 in a South Florida high school. The bulk of academic research , though, shows little to no effect on the incidence of real-world violence from exposure to violent games.