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.
Emergency closure in place on quayside
Passport services to move online
Woman plans to ride 100 miles for charity
Roadworks near Foxdale this week
Postal vote deadline looms for those living abroad
MP reveals more details of Whitehaven ferry proposals
Council wishes Bee Gee happy 80th birthday
Warning over traffic delays as city centre work gets underway