Two men have pleaded guilty after armed police were called to an incident in Leeds.