}
// Make sure we're working with a valid base ItemStack
if (stack == null) return null;
ItemMeta meta = stack.getItemStack().getItemMeta();
List<String> lore = new ArrayList<String>();
// Set Id of the first, invisible lore
boolean hideLore = false;
if (contains("NO_ID")) {
hideLore = Boolean.valueOf(getString("NO_ID"));
}
if (!hideLore)
lore.add(hash);
// Set Display Name
if (contains("DISPLAY NAME")){
String displayName = TagManager.tag(player, npc, getString("DISPLAY NAME"), false, null, debug, new dScript(this));
meta.setDisplayName(displayName);
}
// Set if the object is bound to the player
if (contains("BOUND")) {
bound = Boolean.valueOf(TagManager.tag(player, npc, getString("BOUND"), false, null, debug, new dScript(this)));
}
// Set Lore
if (contains("LORE")) {
for (String l : getStringList("LORE")){
l = TagManager.tag(player, npc, l, false, null, debug, new dScript(this));
lore.add(l);
}
}
meta.setLore(lore);
stack.getItemStack().setItemMeta(meta);
// Set Enchantments
if (contains("ENCHANTMENTS")) {
for (String enchantment : getStringList("ENCHANTMENTS")) {