Controlling stacking of a certain item

Discussion in 'Plugin Development' started by willeb96, Apr 4, 2013.

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

    willeb96

    Hi!
    I want to stop people from stacking empty bowls in their inventory, how would I go about doing this?

    Thanks.
     
  2. Offline

    chasechocolate

    You can use <ItemStack>.setMaxStackSize(1).

    EDIT: That applies to the whole inventory. I think the only think you can do is listen to the InventoryClickEvent and the PlayerPickupItemEvent (and whatever I cannot think of at the moment) and handle the stacksize yourself.q
     
  3. Offline

    willeb96

    Thanks :)
     
Thread Status:
Not open for further replies.

Share This Page