Hi all! There is a way to add some kind of metadata to an itemstack? Im not talking about ItemMeta, i need to add some metadata not persistent between reloads and invisible to players.
gyus I think your best option would be just to change the display name or lore to like a different color or something similar like this Code: ItemStack diamonds = new ItemStack(Material.DIAMOND, 64); ItemMeta diaMeta = diamonds.getItemMeta(); diaMeta.setDisplayName(ChatColor.GOLD + "Diamonds"); diamonds.setItemMeta(diaMeta); then to check for it just do Code: if(item.hasItemMeta() && item.getItemMeta.getDisplayName() == ChatColor.GOLD + "Diamonds") { //item has the name } else { //item does not have the name }
Skionz I know what you say but i don't know how may it help me I have both display name and lore modify on my plugin, but i need to add metadata, since i need to hide some info and erase it on shut down.