The SpongeBob Gavel is seen near the end of the episode under the ownership of Horace A. Whopper. Whopper asks Mr. Krabs if he has anything else to say about his case and Mr. Krabs replies "No, your honor." Whopper slams his SpongeBob Gavel which makes a laughing SpongeBob and Mr. Krabs notices this. Krabs asks Whopper if it is a SpongeBob Gavel and Whopper says he is as he is a big SpongeBob fan. As a result, he makes a deal to ride him around The Krusty Sponge Fun Train (even though Squidward is the one who winds up doing it) and in the end he is not arrested.
The gavel may have a speaker inside of it because SpongeBob's laughter sound can be heard when the gravel is slammed.