Thomas Avery pleaded guilty to breaking into the Royal Canadian Legion and breach of probation.
RCMP were alerted to the break and enter on July 14 when the Legions alarm went off. When they arrived, they heard bottles clinking inside the building.
Avery came out of the building, looking behind him, and ran straight into a police officer, who promptly arrested him.
The 21-year-old man, who admitted he was trying to steal liquor, had been recently released from jail and was on probation at the time.
Averys lawyer, Emerald Murphy, said her client has a drug problem.
Hes a bright otherwise healthy intelligent young man, she said. Hes just given his life over to crack cocaine.
Murphy said her client has tried unsuccessfully to kick the habit and needs to go to a residential treatment centre.
Judge Michel Bourassa said Yellowknifes cocaine problem has become worse over the last few years, but its up to Avery to deal with his addiction.
Theres no magic bullet. No magic pill, said Bourassa. He cant rely on other people to fix him as if he has a cut on his arm.