Solved Banner Tags

Discussion in 'Plugin Development' started by 0verFull, Apr 2, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    0verFull

    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~
     
  2. Offline

    mcdorli

    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.
     
  3. Offline

    0verFull

    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);
     
    Last edited: Apr 2, 2016
  4. Offline

    mcdorli

    You know, if someone puts a # instead of a dot, that means it requires an instance of the class, and isn't static?
     
  5. Offline

    0verFull

    @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);
     
  6. Offline

    mcdorli

    Yeah, now read my original post again
     
  7. Offline

    0verFull

    @mcdorli I don't have the setItemFlag() method. And What you want to tell with "thenbreassign" I don't understand I'm french
     
  8. Offline

    mcdorli

    Then reassign, I'm on a phone.

    Sorry, addItemFlags
     
  9. Offline

    0verFull

    @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.
     
    Last edited by a moderator: Apr 3, 2016
  10. Offline

    mcdorli

Thread Status:
Not open for further replies.

Share This Page