That is so you can detect what kind of gui it is, when displayGuiScreen is called with null. If some mod wants to override the death screen, they can now. If i didn't move it, they receive the event that tells them that an null screen will open, and the mod does not know whether it is GuiMainMenu or GuiGameOver, or it just simply focuses the game.

Also for the checking of the cancelation, i will change that when i have access to my computer again.