A man has been jailed after burgling a student complex to fund his addiction to a legal-high drug.

Jason Berry climbed through a window at the Kings Mill Lane student accommodation in Aspley to steal an Xbox.

He was jailed after a court heard how he planned to use proceeds from the sale of the stolen item to purchase Spice, a form of synthetic cannabis.

Cameron McKay, who acted as Berry’s lookout, was sentenced to a community order.

The men, who are both 21, pleaded guilty to burglary at Kirklees Magistrates’ Court today - Thursday.

They targeted the university student accommodation on Wakefield Road on January 31.

Berry, of Holme Park Court in Berry Brow, climbed through a window into a communal living area on the first floor.

The room contained a television and games consoles which the students were permitted to use.

Andy Wills, prosecuting, said: “At the time a passing motorist reported to police seeing three males stood next to the window.

“He saw one person climbing inside and the other two outside acting as lookouts.

“Berry selected the Xbox, goes to the window and passes this to McKay.”

The men were confronted by a student returning from a jog.

She heard one of the men shouting ‘run’ and they raced towards nearby woods.

The security officer was informed and they were soon traced by police.

Mr Wills said: “They looked dishevelled and their trousers were muddy as if they had been running for a while through the wooded area.”

The Xbox, worth £150, is believed to have been hidden in the woods and has not been recovered.

A third male was charged over the offence but pleaded not guilty and is awaiting trial.

Jonathan Slawinski, mitigating, described the burglary as opportunistic when his clients walked past and noticed the window open.

He described Berry as having a major problem with drink as well as an addiction to legal highs.

Mr Slawinski said: “Jason says he’s turned yellow due to the amount of alcohol he’d been consuming from the age of 13.

“He’s also addicted to Spice and the money from this silly act was going to be used to buy it.”

“He clearly has to stop drinking and taking legal highs or he’s been advised by his GP he will develop emphysema at the age of 25.”

Mr Slawinski added that McKay, of no fixed address, had a chaotic lifestyle and also used cannabis and legal highs.

Magistrates jailed Berry for 26 weeks while McKay must complete 100 hours of unpaid work as part of a community order.

Both men must pay £50 compensation towards replacing the stolen Xbox.