Court told of murder plot