@Override
		public void actionPerformed(ActionEvent e) {
			String message = messageField.getText();
			boolean isMetaMessage = false;
			
			// Bail if message is empty
			if (message.isEmpty()) {
				return;
			}
			
			// Check for '/' commands
			if (message.charAt(0) == '/' && message.length() > 1) {
				// Remote '/' from beginning of message
				message = message.substring(1);
				
				// Tokenize message
				List<String> tokens = new ArrayList<String>(Arrays.asList(message.split(" ")));
				String command = tokens.remove(0);
				int numTokens = tokens.size();
				
				if (command.equals("me") && numTokens > 0) {
					message = join(tokens);
					isMetaMessage = true;
				} else if (command.equals("newgame")) {
					// Bail if not enough tokens
					if (numTokens != 1 && numTokens != 2) {
						return;
					}

					String name = tokens.remove(0);
					String password = "";

					if (numTokens == 2) {
						password = tokens.remove(0);
					}

					sendNewGamePacket(name, password, 0);
					return;
				} else {
					// Ignore any unrecognized commands
					messageField.setText("");
					
					// Inform player of invalid command
					MessagePacket invalidCommandPacket = new MessagePacket();
					invalidCommandPacket.message = "\"" + command + "\" is not a valid command";
					invalidCommandPacket.isMetaMessage = true;
					publishChatMessage(invalidCommandPacket);
					return;
				}
			}

			// Send the message
			MessagePacket messagePacket = new MessagePacket();
			messagePacket.message = message;
			messagePacket.senderName = gameClient.getPlayerName();
			messagePacket.isMetaMessage = isMetaMessage;
			gameClient.getClient().sendTCP(messagePacket);
			publishChatMessage(messagePacket);
			
			// Clear the message field
			SwingUtilities.invokeLater(new Runnable() {
				@Override
				public void run() {
					messageField.setText("");
					messageField.requestFocusInWindow();
				}
			});
		}