Police caught a man hiding behind a pillar after he fled from a property while carrying drugs.
Jake Bostock of Alfred Teare Grove in Douglas appeared before magistrates at Douglas Courthouse.
The 25-year-old admitted possessing hundreds of pounds worth of cannabis and pregabalin tablets on May 14.
Bostock was ordered to do 50 hours community service and pay £125 costs.
Deposits are biggest barrier to getting on property ladder
Vegan beauty salon up for sale
Committee says more housing needed for young people
Half of broken defibs now working
Cider microbrewery planned for Ballasalla
Tree fellers to close part of TT course on Thursday
Manx Utilities wants contractors for HQ refurb