/// <summary>
        /// Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
        /// </summary>
        protected override void ActionPerformed(GuiButton par1GuiButton)
        {
            switch (par1GuiButton.Id)
            {
            case 2:
            case 3:
            default:
                break;

            case 0:
                Mc.DisplayGuiScreen(new GuiOptions(this, Mc.GameSettings));
                break;

            case 1:
                Mc.StatFileWriter.ReadStat(StatList.LeaveGameStat, 1);

                if (Mc.IsMultiplayerWorld())
                {
                    Mc.TheWorld.SendQuittingDisconnectingPacket();
                }

                Mc.ChangeWorld1(null);
                Mc.DisplayGuiScreen(new GuiMainMenu());
                break;

            case 4:
                Mc.DisplayGuiScreen(null);
                Mc.SetIngameFocus();
                break;

            case 5:
                Mc.DisplayGuiScreen(new GuiAchievements(Mc.StatFileWriter));
                break;

            case 6:
                Mc.DisplayGuiScreen(new GuiStats(this, Mc.StatFileWriter));
                break;
            }
        }
        /// <summary>
        /// Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
        /// </summary>
        protected override void ActionPerformed(GuiButton par1GuiButton)
        {
            switch (par1GuiButton.Id)
            {
            default:
                break;

            case 1:
                if (Mc.TheWorld.GetWorldInfo().IsHardcoreModeEnabled())
                {
                    string s = Mc.TheWorld.GetSaveHandler().GetSaveDirectoryName();
                    Mc.ExitToMainMenu("Deleting world");
                    ISaveFormat isaveformat = Mc.GetSaveLoader();
                    isaveformat.FlushCache();
                    isaveformat.DeleteWorldDirectory(s);
                    Mc.DisplayGuiScreen(new GuiMainMenu());
                }
                else
                {
                    Mc.ThePlayer.RespawnPlayer();
                    Mc.DisplayGuiScreen(null);
                }

                break;

            case 2:
                if (Mc.IsMultiplayerWorld())
                {
                    Mc.TheWorld.SendQuittingDisconnectingPacket();
                }

                Mc.ChangeWorld1(null);
                Mc.DisplayGuiScreen(new GuiMainMenu());
                break;
            }
        }