A 21-year-old man has been jailed after being found with nearly 300 cannabis plants worth up to £300,000 at a property in Welshpool.