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.
Bad weather means two ferry crossings cancelled
Commissioner hits out at "nuisance" campervans
Livestock worrying consultation ends this week
Warning over possible ferry disruption tonight
Department told to provide new FOI response to Visit Isle of Man query
700 sign petition to keep Castletown street sweeper
Mystery after oily birds found in Peel
Laxey move announced for well-known jewellers