A young barman offered to spike drinks to make extra money at his hotel job, an Adelaide court has been told.

Jack Hansen, 21, pleaded guilty in the District Court to two trafficking offences after his offending was detected by his employer.

He was given a suspended jail sentence and ordered to pay a fine of $2,000.

The court was told Hansen was working at Sharky's Bar at the Port Lincoln Hotel last November when he heard a man talking with a friend about getting access to drugs.

Judge Geraldine Davison said Hansen, wearing his hotel uniform, approached the man and asked if he wanted to buy some.

"You told him that the prices were $25 if you were not working, $30 if you were working and, most disturbingly, $45 if he wanted it in someone's drink," she said.

"You put your name and your phone number into his phone."

The judge said the hotel management had acted on its suspicions something was wrong.

"The management at Sharky's Bar decided to try and find out whether you were in fact selling drugs," she said.

"They gave this man $50 to attempt to purchase a tablet from you. You served him in the course of your employment and had a conversation with him about the purchase of the tablet.

"You gave that tablet to the man who later gave it to the management of the hotel."

Drugs found in wallet and at house

Judge Davison said police were called and found 29 tablets containing the drug MDMA in the young man's wallet and an ecstasy tablet at his house.

She told Hansen his behaviour had been extremely disturbing.

"Most people would not consider that the barman at the hotel might in fact be the person who is spiking their drinks," she said.

"There is simply nothing that a person could do to guard against this if the barman was in fact doing it. It is very troubling.

"I am told that you now realise the seriousness of what you have done. I would have thought that you would have realised how serious selling drugs was prior to having been caught out doing it."

Hansen was reminded by the court of how his offending supported the wider drug trade.

"The drug trade exists because people like you are prepared to sell small amounts of drugs at street level," Judge Davison said.

"Your offences are particularly serious because they occurred within a hotel and, as I have said, the most disturbing aspect is that you offered to sell a drug that was to be put in someone's drink over the bar by you."

A jail sentence of 29 months with a non-parole period of 18 months was set, but wholly suspended.

The judge said Hansen's age, family support and previous clean record were good reasons to suspend the term and impose a $100 three-year good behaviour bond and the $2,000 fine.

Hansen was sacked by his hotel boss and a three-month barring order imposed at the time his offending was discovered.