@Override
	public void Write(IOClient p, Server server) {
		PacketPrepareEvent event = new PacketPrepareEvent(p, this, server);
		server.getEventSystem().callEvent(event);
		if (event.isCancelled())
			return;
		Player player;
		if (p instanceof Player) {
			player = (Player)p;
		}
		else
			return;
		try {
			byte[] levelbuff = new byte[player.getLevel().getLength() + 4];
			intToNetworkByteOrder(player.getLevel().getLength(), levelbuff, 0, 4);
			for (int i = 0; i < player.getLevel().getLength(); i++)
				levelbuff[i + 4] = player.getLevel().getTile(i).getVisableBlock();
			byte[] gzip = compressBytes(levelbuff);
			levelbuff = null;
			if (gzip == null)
				return;
			int number = (int)Math.ceil(((double)(gzip.length)) / 1024);
			byte[] send;
			byte[] tempbuffer;
			for (int i = 1; gzip.length > 0; ++i) {
				short lenght = (short)Math.min(gzip.length, 1024);
				send = new byte[1028];
				send[0] = ID;
				System.arraycopy(HTNO(lenght), 0, send, 1, 2);
				System.arraycopy(gzip, 0, send, 3, lenght);
				tempbuffer = new byte[gzip.length - lenght];
				System.arraycopy(gzip, lenght, tempbuffer, 0, gzip.length - lenght);
				gzip = tempbuffer;
				int percent = (int)((double)((double)i * (double)100 / (double)number));
				send[1027] = (byte)percent; 
				player.WriteData(send);
				Thread.sleep(10);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}