Remove ItemFlag

Discussion in 'Spigot Plugin Development' started by Helti, Jun 10, 2015.

  1. Good evening,

    i am trying to remove the ItemFlag of an item, but it doesn't work.
    Code (Text):
    private ItemStack createItem(String name,Material mat){
                ItemStack is = new ItemStack(mat);
                ItemMeta isMeta = is.getItemMeta();
                isMeta.removeItemFlags(HIDE_ATTRIBUTES);//Here i try to remove it
                return is;
    This is the methode, I am creating a new Item.
    My problem is, that the value "HIDE_ATTRIBUTES" is unknown in this context.

    Thanks for helping me.

  2. Wouldn't you need to tell the method that you are passing an ItemFlag?
    Code (Text):
  3. Thank you very much for this advise.
    But it didn't solve my real problem.
    There is a picture: Link
    this blue text, how can i remove it?
  4. I don't think that if possible with the api. You would need to work with NBT. Link
  5. You would want to add the flag. Removing a flag called "HIDE" would obviously make it visible.