public static String serialize(Inventory inv) {
		String f = inv.getSize()+"!";
		for(ItemStack is : inv.getContents()) {
			if(is.getType()!=Material.WRITTEN_BOOK) {
				f += getBasicSection(is);
				Map<Enchantment,Integer> enchs = is.getEnchantments();
				if(!enchs.isEmpty()) {
					f += "e#";
					for(Entry<Enchantment,Integer> ench : enchs.entrySet()) {
						f += getEnchantmentSection(ench.getKey(),ench.getValue())+"$";
					}
					f = f.substring(0,f.lastIndexOf("$")-1);
				}
			} else {
				
			}
			f += "&";
		}
		return f.substring(0, f.length()-1);
	}