Skip to content

(Better) support for 1.9? #6

Open

Description

@Mrtenz

This is what shows up in 1.9:
1.9

I know that this project is pretty old, but it would be great if this could be fixed.

Activity

  1. Flawd commented on Apr 23, 2016

    @Flawd

    I have made a fix for that (probably bad code), if you want I can send you.

  2. Mrtenz commented on Apr 24, 2016

    @Mrtenz
    Author

    That would be great.

  3. Flawd commented on Apr 28, 2016

    @Flawd

    http://pastebin.com/8xHHVgfX

    and this is a code example of how im using it

    public static ItemStack armorModify(ItemStack stack, String slot)
        {
            Attributes ab = new Attributes(stack, slot);
            ab.add(Attribute.newBuilder().name("Armor").type(AttributeType.GENERIC_ARMOR).amount(30).build());
            ItemStack stack2 = ab.getStack();
            return stack2;
        }
    

    dont know if you can still apply it to all slots

  4. MrPowerGamerBR commented on Jun 25, 2016

    @MrPowerGamerBR

    @Flawd could you reupload your code? Pastebin says the paste has expired :(

  5. Flawd commented on Jun 26, 2016

    @Flawd

    I dont have it anymore, sorry.
    Just use this, it's better:
    https://www.spigotmc.org/resources/item-attribute-modifier-api-library.22747/

  6. MrPowerGamerBR commented on Oct 27, 2016

    @MrPowerGamerBR

    Okay I finally found a solution for that bug.

        ItemMeta meta = newItem.getItemMeta();
        meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
    

    That's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions