A man was heard mumbling in a Blackpool hotel that he was going to 'stab people', a court has heard.
Niall Kelly, 20, was later found with a large kitchen knife hidden in a sheath in his jacket.
Preston Crown Court was told at 7.45am on October 5 this year. he was overheard by a guest outside the Village Hotel on East Park Drive, Marton, Blackpool, verbally threatening to stab people with a knife
Police were called to the area and while in the reception area of the premises they saw a man matching his description walk out of the venue.
Prosecuting, Mercedeh Jabbari said: " As a result they spoke to him. He agreed the report was about him and said he had become stressed.
"The officer advised as a result he would search him. He replied he had a knife in his jacket. The officer saw a large metal silver handle which he pulled out and it was a large knife in a sheath."
Kelly was taken to the police station, but when he was asked to take his clothing off a plastic Kinder egg fell out, which was found to contain a wrap of cocaine.
In an interview he accepted he had a knife from his mother's kitchen for his own protection as he had people "bullying" him.
Defending, Paul Robinson said Kelly was heard saying things to himself "in frustration" rather than at someone.
He added his month on remand had been his first experience of custody, adding: " He has learnt a salutary lesson that will hopefully act as a deterrent to him.
"Thankfully the weapon wasn't brandished but any possession of any knife in a public place is treated seriously by the courts and quite rightly so."
Kelly, now of Torrington Avenue, Blackley, Manchester, suffers autism and ADHD, and had attempted to take his life in custody, the court heard.
Recorder Sophie Cartwright agreed to suspend his 12 month sentence for two years, and imposed a 40 day rehabilitation activity and curfew after hje admitted possessing a blade and class A drugs.
She acknowledged he was a "clearly a vulnerable young man with unresolved issues", but warned him: "Take the opportunity this court is giving you."
" This is a serious offence."