If Minecraft is not exited it will remain running the background, which pushes the CPU hard generating the heat. I would look to elevate the computer on a cooling stand as that will help the notebook to run slightly cooler, any cheap one will do as the fan has little effect on a Mac portable.
Mac`s are really not designed with gaming in mind, obviously they can be used, equally they run very hot as a result the older ones more so. You could have a Mac specialist clean the cooling system, although I rather feel it will not make a significant difference to the temperature due to the nature of use, and you have to weigh investing money into an old computer.
You also need to consider that the computer now ageing, Apple won't deal with it, although independent Mac specialists will at a price. As such it would be prudent to budget for a replacement, I don't suggest that you replace the notebook, rather that you are financially prepared. At seven years old and being pushed hard, the potential for failure increases.
The health of the battery can be checked by downloading a small application
Coconutbattery It can be done from the operating system, however takes more steps. From my experience with older Mac`s I doubt the battery will result in such elevated temperatures.
Q-6