public static String toString(Inventory i) {
        YamlConfiguration configuration = new YamlConfiguration();
        configuration.set("Title", i.getTitle());
        configuration.set("Size", i.getSize());
        for (int a = 0; a < i.getSize(); a++) {
            ItemStack s = i.getItem(a);
            if (s != null)
                configuration.set("Contents." + a, s);
        }
        return Base64Coder.encodeString(configuration.saveToString());
    }