Question PC Turns off after playing game

Oct 29, 2019
4
0
10
I've had my current computer since christmas of last year, its performed great,

Z390 Phantom Gaming Motherboard
1070ti,
i5 9600k,
8gb of ram
Windows 10 pro.

it's always cool, runs games great, but for some odd reason i've seemed to have with this system is whenever i play either Minecraft or Call of Duty: Modern Warfare, the computer will randomly shut off, and then reboot itself in seconds, this only happens on minecraft when im playing multiplayer. and the same for modern warfare, I've looked in my PC BIOS and found nothing that would effect it thermal wise, i genuinely have no idea why it does this, does anyone know why it does this? i have yet to find someone or a thread that has this similar issue.