public synchronized void sendChatEvent(ChatEvent chatEvent) {

		/*
		 * IF CLIENT
		 */
		if (networkHandler.getProgramState() != null && networkHandler.getProgramState().isRunning() && networkHandler.getProgramState().isClient())
			try {
				System.out.println("Sending: " + chatEvent);
				// See:
				// http://stackoverflow.com/questions/14883073/sending-the-same-objects-with-different-fields-over-an-object-serialized-stream
				networkHandler.getClient().getObjectOutputStream().reset();
				networkHandler.getClient().getObjectOutputStream().writeObject(chatEvent);
				messageHandler.fireChatEventToListeners(chatEvent);
			} catch (IOException e) {
				e.printStackTrace();
			}
		/*
		 * IF SERVER
		 */
		else if (networkHandler.getProgramState() != null && networkHandler.getProgramState().isRunning() && networkHandler.getProgramState().isServer()) {
			networkHandler.getServer().broadcastChatEventToAll(chatEvent);
		}
	}