Drugs squad gardaí arrived with a warrant to search a house in Passage West but the man refused to open the door for 15 minutes and was seen throwing drugs out the back window of the house.
Sergeant Gearóid Davis said garda officers were at the front door of the house but they were also around the back and observed the drugs being thrown from the window on December 18 2019.
Roland Snidarec of The Grove, Pembroke Woods, Passage West, County Cork, was fined €500 for possession of drugs, he was fined another €500 for obstructing a drugs search and he was given a six-month suspended sentence and a 200-hour community service order for having drugs for sale or supply.
The value of cannabis totalled €1,800.
Defence solicitor, Simon Kelly, said the 27-year-old was not selling drugs but was supplying them to friends.
“He was looking after friends, organising drugs to supply to them and he was getting his drugs free, for want of a better word.
“He has learned by this whole ordeal. He won’t offend again.
“There was a certain naivety in his behaviour and this is borne out by the probation service in their report. I would ask you not to impose a prison sentence,” Mr Kelly asked at Cork District Court.
Judge Olann Kelleher agreed to impose a range of penalties other than custody for the 27-year-old.