It was basically all manner of filth that people lived in back then. Both the rats and the fleas were a part of it, but it IS significant that large numbers of villagers stopped dying when merchant ships that traveled from coastal town to coastal town doing business started carrying cats that then killed the rats and halted the spread of the plague.
The interesting thing is that back in the 1300s, there were many areas of Europe hit hard by the plague where there were no rats. They hadn’t extended their range that far at the time.