Solved Lapis Lazulli. What is the id and how do I add it to the inventory?

Discussion in 'Spigot Plugin Development' started by Zendovo, Jun 3, 2017.

  1. Hello my question is What is the id and how do I add it to the inventory? I am currently doing this but isnt working:
    Code (Text):
    player.getInventory().addItem(new ItemStack(Material.LAPIS, fortune));
    How do I do it?
     
  2. I believe the lapis item is considered a DYE in bukkit, you may want to log onto a server, and hold a piece of lapis and do /itemdb
     
  3. Code (Text):
    player.getInventory().addItem(new ItemStack(Material.INK_SACK, 1 , (short) 4));
    Believe this is what I used.
     
    • Like Like x 1
  4. As said by indie guts, lapis is under dye material datas. (Material.INK_SACK)
    You should do this
    Code (Text):
    player.getInventory().addItem(new ItemStack(Material.INK_SACK, fortune,(short)4));
     
    • Agree Agree x 2