God always listens to prayers. That does not mean, however, that He is always going to answer them or necessarily be pleased that the person is praying. In Jeremiah 14, God had already made up His mind that He was going to punish Israel for their sins. He told Jeremiah not even to bother praying for the people. Furthermore, He told the cries of the people.
22 And Jesus answering saith unto them, Have faith in God.
23 For verily I say unto you, That whosoever shall say unto this mountain, Be thou removed, and be thou cast into the sea; and shall not doubt in his heart, but shall believe that those things which he saith shall come to pass; he shall have whatsoever he saith.