In Parshas Noach, it is written:
וַֽהֲקִֽמֹתִ֤י אֶת־בְּרִיתִי֙ אִתְּכֶ֔ם וְלֹֽא־יִכָּרֵ֧ת כָּל־בָּשָׂ֛ר ע֖וֹד מִמֵּ֣י הַמַּבּ֑וּל וְלֹא־יִֽהְיֶ֥ה ע֛וֹד מַבּ֖וּל לְשַׁחֵ֥ת הָאָֽרֶץ:
And I will establish My covenant with you, and never again will all flesh be cut off by the flood waters, and there will never again be a flood to destroy the earth.
However, the Rambam writes in Mishneh Torah, Repentance 3,
וְכֵן כָּל הָעוֹלָם כֻּלּוֹ אִם הָיוּ עֲוֹנוֹתֵיהֶם מְרֻבִּין מִזְּכֻיּוֹתֵיהֶן מִיָּד הֵן נִשְׁחָתִין
...So, too, is the whole world, if their vices exceeded their virtues they are presently destroyed.
If there is a contradiction between these two sources, how can it be solved? If there is not a contradiction, can the world be destroyed, just not through the use of a flood? Was Hashem implying that there is a possibility that the world may be destroyed, but such a thing will not happen?