Two men have been sentenced for planning a targeted attack on a family in Lochgelly which endangered the lives of two adults and three young children.