Stephen Smith was watching television in the lounge at the flat in Frances Lane House, Horsefair, when he heard the front door being repeatedly kicked and wrenched off its hinges.
Leeds Crown Court heard Mr Smith ran in to a bedroom, hid under a bed and dialled
999 to alert police during the incident just after 5pm on April 25.
Prosecutor, Jo Shepherd said Mr Smith heard men talking in the flat and looked out of a window to see two men walking away carrying items from the flat.
He hid again after hearing another man enter the flat.
Miss Shepherd said Mr Smith hid in a travel cot and pulled a duvet over himself.
The court heard Mr Smith recognised one the voices of the men who had been talking in the flat.
Liam Ferguson, 25, of Chequerfield Road, Chequerfield, Pontefract, was later arrested. Among items stolen from the flat were a 42 inch TV, a mountain bike and a Sony Playstation.
Ferguson, who has 16 previous convictions for 27 offences including burglary and robbery, admitted burgling the flat.
Michael Jowett, for Ferguson said he had been drinking vodka before committing the offence.
Mr Jowett told the court: “There had been some bad blood between the complainant and friends of this defendant.
“He knows it was utterly stupid. Hr knows there are no excuses for an offence like this.”
Jailing Ferguson for 20 months, recorder Tony Kelbrick told him: “What you did had a significant effect on this man.”