public String getItemInfo(ItemStack item) {

        if ( item == null ) {
            return "";
        }

        StringBuilder message = new StringBuilder();

        @SuppressWarnings("deprecation")
        int itemID = item.getTypeId();
        int amount = item.getAmount();
        short durability = item.getDurability();
        String color = null;
        if ( 298 <= itemID && itemID <= 301 ) {
            LeatherArmorMeta lam = (LeatherArmorMeta)item.getItemMeta();
            Color colorTemp = lam.getColor();
            if ( colorTemp != null ) {
                color = convertColorToString(colorTemp);
            }
        }

        message.append(itemID);
        Map<Enchantment, Integer> enchants = item.getEnchantments();
        Set<Enchantment> keys = enchants.keySet();
        for ( Enchantment e : keys ) {
            @SuppressWarnings("deprecation")
            int id = e.getId();
            message.append("^" + id + "-" + enchants.get(e));
        }
        if ( durability > 1 ) {
            message.append("@" + durability);
        }
        if ( color != null ) {
            message.append("$" + color);
        }
        if ( amount > 1 ) {
            message.append(":" + amount);
        }

        return message.toString();
    }