Sahih Muslim #2614 c
The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship 45:160
Jabir reported that Allah's Messenger (ﷺ) commanded a person who had been distributing arrows freely in the mosque that he should not move about in the mosque but by catching hold of their iron-heads. Ibn Rumh narrated this with a slight variation of wording.