A burglar was involved in a raid which left a social club was caught after leaving behind an empty drink bottle, Lincoln Crown Court was told.
Lee Ross broke into the Melrose Sports & Social Club in Gainsborough in the early hours of the morning but appeared to have left without stealing anything.
Victoria Rose, prosecuting, said "The burglary occurred at 3.30 am when an alarm was activated.
"The key holder attended and discovered that the ceiling in the snooker room had collapsed.
"There was no sign of any entry and it was assumed that the ceiling had simply collapsed.
"The following day it was discovered that entry had been obtained and a pane of glass was missing.
"There was an energy drink bottle discarded in the rubble from the ceiling. When it was analysed DNA from Ross was recovered from it.
"There had been nothing taken in the burglary but extensive damage was caused."
Miss Rose said that 30 minutes later the alarm was activated at the Trent Port pub and a member of staff who was asleep in a bedroom checked the CCTV to discover two people in the back yard and the gate open.
"Both men had tried to enter through the back door. The defendant was arrested later that morning because his clothing matched that of one of the men on the CCTV."
When Ross was detained he told police "I didn't break in there. I was just around the back."
The court was told that Ross had 43 convictions for a total of 91 previous offences.
Ross, 46, of Whites Wood Lane, Gainsborough, admitted burglary of Melrose Sports & Social Club and attempted burglary of the Trent Port. Both offences took place on April 21.
He was given a 22 month jail sentence suspended for two years with a rehabilitation activity requirement of up to 20 days and an eight month drug rehabilitation requirement.
Leanne Summers, in mitigation, said that Ross is currently on a community order for other offences and has been doing well.
Judge John Pini QC, passing sentence, told Ross "It appears you are making efforts to end your dependency on drugs and to try to rehabilitate yourself. This is your last chance."