A man has been branded a fool for having an axe outside a pub at about 9.30am.
Tom Stocks, 20, had been in a fight the previous evening and thought his opponent would go after him, Barnsley Magistrates' Court was told.
Julie Grant, prosecuting, said police were called after Stocks was seen with the axe outside the Rusty Dudley in Goldthorpe.
She said Stocks, of Hope Avenue, Goldthorpe, ran off when the police arrived and dumped the axe in some bushes.
Mrs Grant added: "He had the axe for his protection. He was not looking for trouble but realised other members of the public would be scared when they saw him with the axe."
Gus Kennedy, defending, said the axe was rusty and blunt. Stocks said after his arrest that he thought the man he had been in a fight with would come after him.
"If he got me again, I would have had it," Stocks told police.
Deputy District Judge Tim Capstick said: "This was an act of foolishness. Don't ever do this again."
Stocks admitted possessing an offensive weapon. He was ordered to do 120 hours of unpaid work, to pay £85 in costs and a £60 victim surcharge.