private PacketType(Class ... classes)
	{
		opcode = (byte)(nextOpcode++);
		packets[opcode] = this;
		params = new Class[classes.length];

		int length = 0;

		for(int classNumber = 0; classNumber < classes.length; classNumber++)
		{
			Class class_ = classes[classNumber];

			params[classNumber] = class_;

			if(class_ == Long.TYPE)
			{
				length += 8;
			} else if(class_ == Integer.TYPE) {
				length += 4;
			} else if(class_ == Short.TYPE) {
				length += 2;
			} else if(class_ == Byte.TYPE) {
				++length;
			} else if(class_ == Float.TYPE) {
				length += 4;
			} else if(class_ == Double.TYPE) {
				length += 8;
			} else if(class_ == byte[].class) {
				length += 1024;
			} else if(class_ == String.class) {
				length += 64;
			}
		}

		this.length = length;
	}