Man sentenced for possession of over 300 marijuana plants, unregistered machine gun