public void actionPerformed(ActionEvent e)
    {
        GuiCommand command = GuiCommand.getCommand(e.getActionCommand());
        if(state == State.Login)
        {
            switch (command)
            {
                case ServerStart:
                {
                    ServerHelper.getNetworkManager().connect(login.getPort());

                    if(ServerHelper.getNetworkManager().isConnected())
                    {
                        setState(State.Lobby);
                    }
                    break;
                }
            }
        }

        if(state == State.Lobby)
        {
            switch (command)
            {
                case ServerStop:
                {
                    ServerHelper.getNetworkManager().close();
                    setState(State.Login);
                    lobby.clearClients();
                    break;
                }

                case GameStart:
                {
                    setState(State.Game);
                    break;
                }
            }
        }
    }