Talk to the prosecuting attorney before the court date, not the judge. Tell him your situation, he may be sympathetic. The same thing happened to me before I joined, but instead of a friend throwing a trash can it was me hitting a guy in the face. Talked to DA, plead guilty to some bullshit charge that no one cared about.