public void actionPerformed(ActionEvent ae) {
		if(ae.getSource() == GUI.g.playButton){
			
			if(GUI.g.enterName.getText().trim().length() == 0){
				GUI.g.mainMenuPanel.validName = false;
				GUI.g.repaint();
				GUI.g.mainMenuPanel.repaint();
			}
			else{
				GUI.g.connect();
				GUI.g.playerName = GUI.g.enterName.getText();
				GUI.g.cardLayout.show(GUI.g.allPanels, "Waiting");
				GUI.g.repaint();
				GUI.g.game.requestFocusInWindow();				
				GUI.g.game.repaint();
			}
		}
		if(ae.getSource() == GUI.g.quit){
			System.exit(0);
		}
		if(ae.getSource() == GUI.g.about){
			GUI.g.cardLayout.show(GUI.g.allPanels, "About");
		}
		if(ae.getSource() == GUI.g.highScore){
			GUI.g.cardLayout.show(GUI.g.allPanels, "HighScore");
		}
		if(ae.getSource() == GUI.g.back || ae.getSource() == GUI.g.back2){
			GUI.g.mainMenuPanel.validName = true;
			GUI.g.enterName.setText("");
			GUI.g.cardLayout.show(GUI.g.allPanels, "Menu");
		}
		if(ae.getSource() == GUI.g.gameplayPanel.jump){
			//GUI.g.player.jump();
			GUI.g.player.jumping = true;
		}
		if(ae.getSource() == GUI.g.gameplayPanel.duck){
			//GUI.g.player.duck();
			GUI.g.player.ducking = true;
		}
					
	}