Unstack items when given

Discussion in 'Plugin Development' started by immensebuttpain, Feb 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    immensebuttpain

    Code:java
    1. int damageval = 16421;
    2. for(int i = 0; i < 16; i++) {
    3. pInv.addItem(new ItemStack(Material.POTION, 1, (short) damageval));

    That's giving me 16 stacked potions, any idea on how i can unstack them?
     
  2. Offline

    Whomp54

    You can maybe try setting a damage value that increases every time. Because they are not the same item, they will not stack. I do not have any code present, sorry. If anyone has any code for this, you may post it here :)
     
  3. Offline

    immensebuttpain

    Well yeah, that didn't work very well. Thanks anyway :p

    Anyone have the code for this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 6, 2016
Thread Status:
Not open for further replies.

Share This Page