A twenty-year-old man has been jailed for a year-and-a-half for offences including being involved in the supply of cocaine and heroin.