public void run() {
		ServerThread sendToClients = new ServerThread(this);
		sendToClients.start();
		
		while (true) {
			try {
				DatagramPacket recvPacket = new DatagramPacket(recvBuffer, recvBuffer.length);
				sock.receive(recvPacket);
				String data = new String(recvPacket.getData());
				InetAddress ip  = recvPacket.getAddress();
				int port = recvPacket.getPort();

				System.out.println("Received from " + ip + " , port " + port + ": " + data);
				
				String type = Utils.parseType(data);
				if (type == null) continue;
				if (type.equals("connect")) {
					UUID id = Utils.parseId(data);
					clients.put(id, new ClientData(ip, port));
					continue;
				} else if (type.equals("disconnect")) {
					UUID id = Utils.parseId(data);
					// TODO: Remove objects owned by player
					continue;
				} else if (type.equals("chat")) {
					for(ClientData client : clients.values()) {
						InetAddress ip1 = client.getIp();
						int port1 = client.getPort();

						sendBuffer2 = data.getBytes();
						DatagramPacket sendPacket2 = new DatagramPacket(sendBuffer2, sendBuffer2.length, ip, port);
						try {
							sock.send(sendPacket2);
						} catch (IOException e) {
							e.printStackTrace();
						}
					}
					continue;
				}
				// Send ack
				UUID id = Utils.parseId(data);
				state.put(id, data);
				sendBuffer = ("type:ACK " + id + "\n").getBytes();
				DatagramPacket sendPacket = new DatagramPacket(sendBuffer, sendBuffer.length, ip, port);
				sock.send(sendPacket);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}