public void run(){
		try {
			while(true){
				byte[] data = new byte[1024];
				DatagramPacket packet = new DatagramPacket(data, data.length);
				ds.receive(packet);
				String content = new String(packet.getData()).trim();
				if(content.startsWith("user/")){
					p = new Player(content.split("user/")[1], 100, 1, 1, Main.s);
					server.getList().add(p);
					main.refreshPlayer();
					server.sendToClients("Welcome " + content.split("user/")[1] + "!");
					main.addChatMessage("Player " + content.split("user/")[1] + " has joined the server from " + Client.getInetAddress().getHostAddress());
				} else if(content.startsWith("chat/")){
					server.sendToClients(content.split("chat/")[1]);
					main.addChatMessage(content.split("chat/")[1]);
				} else if(content.startsWith("disconnect/")){
					server.removePlayer(p, Client.getInetAddress(), p.getName(), this);
					main.refreshPlayer();
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}