Police who visited a Telford man's address after he threatened to kill his ex-partner's new boyfriend over Facebook, found a cannabis farm, bags of cocaine and a shotgun at his home, a court has heard.