Let's look at the narrow context:
27 “You have heard that it was said, ‘You shall not commit
adultery.’ 28 But I tell you that anyone who looks at a woman
lustfully has already committed adultery with her in his heart. 29 If
your right eye causes you to stumble, gouge it out and throw it away.
It is better for you to lose one part of ...