Hi everyone, I am developing a new plugin (in 1.9.0), in this I create banner with BannerMeta and all work well. But I want to remove the banner's attributs of the item, for exemple: Yellow Border. How I can do it ? (I already looked for but found nothing) Thanks for help and atention. 0verFull~
Are those available, if you don't have f3+H turned on? I would try to use ItemMeta#setItemFlag(ItemFlag.HIDE_ATTRIBUTES), thenbreassign the meta to the item.
The F3+H is turned off so Tooltips are hidden. I will try your solution in few minutes and I will tell you if is work. @mcdorli I have try your solution but It not work (ItemMeta#removeItemFlags(ItemFlag.HIDE_ATTRIBUTES);
You know, if someone puts a # instead of a dot, that means it requires an instance of the class, and isn't static?
@mcdorli Yes I konw, In my code it's: Code: final ItemStack gh = new ItemStack(Material.BANNER); final BannerMeta ghm = (BannerMeta) gh.getItemMeta(); /* * *AddColor * */ ghm.removeItemFlags(ItemFlag.HIDE_ATTRIBUTES); gh.setItemMeta(ghm);
@mcdorli I don't have the setItemFlag() method. And What you want to tell with "thenbreassign" I don't understand I'm french
@mcdorli OK, I Will try your solution in few moments. Thanks @mcdorli I have try your solution. The addItemFlags() exists and works but the ItemFlag "HIDE_ATTRIBUTES" works for sword, and for the banner it needs to use "HIDE_POTION_EFFECTS" to remove banner modifiers. Thanks for your help. EDIT by Moderator: merged posts, please use the edit button instead of double posting.