"If the world is judged by you, are you not competent to constitute the smallest law courts?"
That's Paul to the church of Corinth.
Here's James:
Do not speak against one another, [James 1:16; 5:7, 9, 10] brethren He who speaks against a brother or [Matt 7:1; Rom 14:4] judges his brother, speaks against [James 2:8] the law and judges the law; but if you judge the law, you are not [James 1:22] a doer of the law but a judge of it.
Do not complain, [James 5:7, 10] brethren, against one another, so that you yourselves may not be judged; behold, [1 Cor 4:5; James 4:12; 1 Pet 4:5] the Judge is standing [Matt 24:33; Mark 13:29] right at the door.
Here's Jesus. He's speaking to believers. "Brothers" are brothers in Christ. It's a specific term used to distinguish believers.
1"(A)Do not judge so that you will not be judged.
2"For in the way you judge, you will be judged; and (B)by your standard of measure, it will be measured to you.
3"Why do you (C)look at the speck that is in your brother's eye, but do not notice the log that is in your own eye?
4"(D)Or how can you say to your brother, 'Let me take the speck out of your eye,' and behold, the log is in your own eye?
5"You hypocrite, first take the log out of your own eye, and then you will see clearly to take the speck out of your brother's eye.
6"(E)Do not give what is holy to dogs, and do not throw your pearls before swine, or they will trample them under their feet, and turn and tear you to pieces.
Jesus is speaking directly to believers about their dealings with other believers, and telling them not to waste their time or energy on those who choose not to believe. Which I should take to heart.
Jesus was not afraid to be friends with non-believers, looking past the sin in their lives to see who God created them to be. (Luke 19:7) He understood that accepting the person is not the same thing as accepting their sins. As the old saying goes, Love the sinner, not the sin.
Jesus was ridiculed for being a friend to sinners. He accepted prostitutes, lepers, publicans, and the poor. He believed the kingdom of heaven was available to any who would turn to him.
When Jesus called Matthew to be a disciple, the tax-collector got a bunch of his tax-collecting friends together for a large banquet with Jesus. (Luke 5:30) Jesus jolted the religious culture by hanging out with a group of people who were stereotyped as spiritually bankrupt.
Therefore, as Gods chosen people, holy and dearly loved, clothe yourselves with compassion, kindness, humility, gentleness, and patience (emphasis mine). We are to care, just as Christ cares, for the lost souls of men.
I would assume that this also means that you should be kind and not judge.
"Let he who is without sin, cast the first stone."