From Sahih Muslim (Hadith 6663):
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
Reference: Muslim 6663