Solved 1.13 new itemstack creation?

Discussion in 'Spigot Plugin Development' started by Eliminator, Jul 22, 2018.

Thread Status:
Not open for further replies.
  1. How does one create a new ItemStack in 1.13 API?
    The old new ItemStack(x); does not work anymore.


    Thank you.
     
  2. Praya

    Benefactor

  3. Praya

    Benefactor

    oh you're right. now it's protected
     
  4. Then use the other ones. What good is an ItemStack with no data?
     
  5. When I even do this:
    ItemStack i = new ItemStack();

    I get: The constructor ItemStack() is not visible
     
  6. I got it, eclipse was just not filling shiz in like normal.

    Gotta use the new:
    ItemStack(Material type, int amount, short damage, java.lang.Byte data)
     
  7. That's not new, it has always been something like this. You can also use:
    new ItemStack(material)
    new ItemStack(material, amoun)
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.