ItemRenamer 2.0.1

Details

  • Filename
    ItemRenamer-2.0.1.jar
  • Uploaded by
  • Uploaded
    Oct 16, 2013
  • Size
    181.53 KB
  • Downloads
    3,177
  • MD5
    c67ac25878f1d5bb52739e3bd9a47694

Supported Bukkit Versions

  • 1.6.4
  • 1.5.2

Changelog

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: