Item Renamer

Item Renamer

File Details

ItemRenamer 2.0.1

  • R
  • Oct 16, 2013
  • 181.53 KB
  • 3.3K
  • 1.6.4+1

File Name

ItemRenamer-2.0.1.jar

Supported Versions

  • 1.6.4
  • 1.5.2

Build: #55

For users, there are two features of interest in this release - the ability to specify a default item pack, and the ability to hide durability on items.

In addition, developers can now take advantage of ItemRenamer's capabilities in their own plugin, for instance to create an enchantment glow without any enchantments (download):

@Override
public void onEnable() {
    RenamerAPI.getAPI().addListener(this, RenamerPriority.POST_NORMAL, new ItemsListener() {
        @Override
        public void onItemsSending(Player player, RenamerSnapshot snapshot) {
            addGlow(snapshot);
        }
    });
}

private void addGlow(RenamerSnapshot stacks) {
    for (ItemStack stack : stacks) {
        // Only update those stacks that have our flag lore
        if (stack != null && stack.hasItemMeta()) {
            List<String> lore = stack.getItemMeta().getLore();
            
            if (Arrays.asList(EXAMPLE_MOD_GLOW).equals(lore)) {
                NbtCompound compound = (NbtCompound) NbtFactory.fromItemTag(stack);
                compound.put(NbtFactory.ofList("ench"));
                compound.getCompound("display").remove("Lore");
            }
        }
    }
}

Features

API

Fixes

See also: