"Whenever you feel like criticizing any one," he told me, "just
remember that all the people in this world haven't had the advantages
that you've had."
Not seen the context, however, this excerpt can also be interpreted as:
"Whenever you feel like criticizing any one," he told me, <just remember that all people in this world are not the same as you who like criticizing someone else>
This might be a sweet why to say you have done too much in criticizing people. "The advantages" here can actually mean the disadvantages or the weakness of 'You'.
Anyway, without the context, it's hard to speculate the meaning of this excerpt.