A man has pleaded guilty to attempting to have a 'sexual communication' with a 'decoy' who was pretending to be a child.