Basically Jesus was talking about self righteousness...
Of course you have to live a less sinful lifestyle...one not categorized by sin at a minimum.
Let's take a look at what Paul says in Ephesians 4: 20 But ye have not so learned Christ; 21 if so be that ye have heard him, and have been taught by him, as the truth is in Jesus: 22 that ye put off concerning the former conversation the old man, which is corrupt according to the deceitful lusts; 23 and be renewed in the spirit of your mind; 24 and that ye put on the new man, which after God is created in righteousness and true holiness. 25 Wherefore putting away lying, speak every man truth with his neighbour: for we are members one of another. 26 Be ye angry, and sin not: let not the sun go down upon your wrath: 27 neither give place to the devil.