I have noticed that if the charger is plugged in when I play Minecraft, the battery will sometimes discharge. The few times this happened, the machine became very hot near the Magsafe connector. It concerns me, because I can not imagine the hardware is designed to discharge the battery while it is connected to power.
I find this worrying; you may have a charger or battery issue. You could always try to
reset the SMC and see this issue remains.