promotional bannermobile promotional banner

Item Renamer

Item Renamer
Back to Files

ItemRenamer 2.0.1

File nameItemRenamer-2.0.1.jar
Uploaded
Oct 16, 2013
Downloads
3.3K
Size
181.5 KB
File ID
746442
Type
R
Release
Supported game versions
  • 1.6.4
  • 1.5.2

What's new

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:

This mod has no related projects