A drug addict from Bridlington threatened a man with a knife during a raid on a flat in Harrogate.
Jamie Hardcastle, 24, brandished the knife and told the victim he would use it if he did not do what he asked.
Hardcastle then took the man’s iPad while his accomplice, 19-year-old Daniel Lister, helped himself to a laptop.
York Crown Court heard that the terrifying incident, which happened in Devonshire Place on February 24 last year, happened in the presence of the victim’s girlfriend.
Hardcastle was later arrested and charged with affray and possessing an offensive weapon. He appeared in court on Friday when he pleaded guilty to the charges.
His cohort Lister, also a drug addict, admitted the same offences as well as two counts of burglary, theft and a public-order matter related to separate offences.
Hardcastle’s defence counsel said his client threatened the man with the knife but did not use it.
He added that Hardastle – who has 16 previous convictions for offences including violence and burglary – had fallen into a life of crime due to his “chronic” drug and alcohol addictions.
He had spent long periods of his life sleeping rough but was now planning to move to a different part of the country to find work and get away from bad influences in Yorkshire.
Judge Stephen Ashurst deferred Hardcastle’s sentence for four months to see if he could come good on his promise to stay out of trouble. If he did not, he would be sent straight to prison. Hardcastle, of Princess Street, Bridlington, will be sentenced on July 10.
Lister, of Fountains Avenue, Harrogate, and a third man, Joshua Robinson-Bramley, 19, were given immediate custodial sentences for a series of burglaries in March last year.
There was no evidence to suggest Hardcastle was involved in these offences, but Lister was jailed for 27 months and Robinson-Bramley, of Beeston, was sent to a young offenders institution for 15 months.