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.
Repairs on Peel Power Station to get underway
Manx Care doctor survey to be discussed by Tynwald
Weather warning for snow tonight
MHK queries safety at primary school in Ballabeg
Gales put two ferry sailings at risk tonight
Should the Island throw a birthday party for Barry Gibb?
Warning issued over icy roads
High ground could see 4 inches of snow on Saturday night