Chosen Solution

There’s a problem with my MacBook Pro: It restarts when it’s plugged onto power, and it is not supposed to do that. It started to do like that since yesterday. Last week I accidentally spilled water onto my system, I started it two times and then I let it dry off for 4 days. And now everything except for the charge-restart thing is working.

Clearly the water damaged things. Its time to get your system in to someone with the deeper skills to properly diagnose where the problem is located. Its either within the keyboard which will require either the full uppercase replaced or maybe just the power switch alone. Its also possible the water made its way down to the logic board.