He also allegedly threatened to commit a mass shooting.