Removing the "dyed" from leather armor

Discussion in 'Plugin Development' started by kreashenz, Sep 21, 2013.

Thread Status:
Not open for further replies.
  1. Is there anyway to remove the "dyed" message from under leather armor? If you don't know what I mean, look.

    I've taken a look at but I'm not sure which tag to edit.

    Hopefully someone can help here, thanks :D

    [EDIT] So I've taken a shot at trying this, and I used
    1. public static ItemStack removeDyed(ItemStack item){
    2. try {
    3. Object nmsItem = NMSStuff.getNMSItem(item);
    4. Object modifiers = NMSStuff.getNMSClass("NBTTagList").newInstance();
    5. Object tag = NMSStuff.getNMSValue("ItemStack", "tag", nmsItem);
    6. if (tag == null) {
    7. tag = NMSStuff.getNMSClass("NBTTagCompound").newInstance();
    8. NMSStuff.setNMSValue("ItemStack", "tag", nmsItem, tag);
    9. }
    10. Method meth = NMSStuff.getNMSClass("NBTTagCompound").getDeclaredMethod("set", String.class, NMSStuff.getNMSClass("NBTBase"));
    11. meth.invoke(tag, "display", modifiers);
    12. NMSStuff.setNMSValue("ItemStack", "tag", nmsItem, tag);
    13. return NMSStuff.getBukkitItem(nmsItem);
    14. }
    15. catch(Throwable t){
    16. t.printStackTrace();
    17. }
    18. return item;
    19. }

    And when I try getting the item, my game closes itself or crashes.
  2. Nope, I believe its client side.
  3. I checked it. To remove this text you need to remove color tag which removes color.
                    if (var16.hasKey("color"))
                        if (par2)
                            var3.add("Color: #" + Integer.toHexString(var16.getInteger("color")).toUpperCase());
                            var3.add(EnumChatFormatting.ITALIC + StatCollector.translateToLocal("item.dyed"));
    par2 is mode where you see more informations about items like exact durability or item id. var3 is list of strings which contains all info in tooltip like enchantments, lore, potion effect etc.
Thread Status:
Not open for further replies.

Share This Page