Because Wilson had no firearms licence, the police conducted a warranted search of his property on March 22.
Bullets and shells used for the firearm were located on the search but no firearm.
After the police discovered four cannabis plants, 1.2 metres high each, and cannabis leaf weighing 130.76 grams, Wilson admitted to all allegations.
In the police summary of facts Wilson's explanation was: "The cannabis is mine for personal use. I did have an illegal firearm but I sold it to a gang member. I knew it was an illegal firearm."
Judge Phillip Cooper said there was no lawful reason for a weapon like that to be in Wilson's possession.
"The fact it was sold to a gang member is a very serious aspect of the matter, " Judge Cooper said.
Judge Cooper convicted Wilson of all charges and remanded him on bail for a sentencing on September 27.