public void WriteData(byte[] data) throws IOException {
		Packet p = pm.getPacket(data[0]);
		if (p != null) {
			PacketSentEvent event = new PacketSentEvent(this, pm.server, p);
			pm.server.getEventSystem().callEvent(event);
		}
		writer.write(data);
		writer.flush();
	}