Narrated Abu Hurairah (radiyallaahu-anhu): The Prophet (sallal-laahu-alayhi-wasallam) said, ”None of you should point a weapon towards his Muslim brother, for he does not know, satan may tempt him to hit him and thus he would fall into a pit of fire (hell).”[1]

Imaam Abdul-Azeez Bin Baaz (rahimahullaah) said: It is not permissible to play about with a weapon even (if that is done out of) joke. As for training with a weapon and learning how to carry it (safely) etc., this is praiseworthy just as the Ethiopians did in the masjid [i.e. during the lifetime of the Messenger (sallal-laahu-alayhi-wasallam)] [2]
———————————————————————————————————————————————————————————————————————————————————
References
[1] Saheeh al-Bukhaari-Vol 9. Hadeeth Number:7072. Page:131. Book of Al-Fitan. Daarus Salaam
[2]Al-Hulalul Ibreeziyyah Min At-Taliqaat Al-Baaziyyah Alaa Saheeh al-Bukhaari. Footnote: 3. Page: 389. Vol: 4