I have problem with itemstack

Discussion in 'Spigot Plugin Development' started by AvaterysPL, Sep 16, 2018 at 1:45 PM.

Thread Status:
Not open for further replies.
  1. z
     
    #1 AvaterysPL, Sep 16, 2018 at 1:45 PM
    Last edited: Sep 16, 2018 at 6:20 PM
  2. You set the ItemStack’s item type to a material.book
    And are trying to use enderchest meta, you should change it to an enderchest type or use bookMeta.

    Or just use ItemMeta if you only need to set the display name/lore


    Sent from my iPhone using Tapatalk
     
  3. He's trying to say ChatColor.MAGIC isnt working.

    Anyhow, besides that, I have not a clue why this happens.
     
    • Like Like x 1
  4. It should work, can we see your Util.fixColor method? Perhaps there is something that replaces a color code or something, but I could be wrong.
     
    • Like Like x 1
    • Like Like x 1
  5. I can see why you would think that at first glance but enderchest is only in the variable names. He is using regular itemmeta.
     
    • Like Like x 1
  6. The only issue was that he wasn't setting the ItemMeta with ItemStack#setItemMeta(ItemMeta)..
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page