Fixes conflict with GameModeInventories.

Moving GameMode switching to before storing the player data means GMI can save the inventory before it is cleared, and prevents eventual inventory loss after MobArena restores it back.