Solved Removing ItemStack on rightclick

Discussion in 'Plugin Development' started by Feindbild, Dec 14, 2014.

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

    Feindbild

    I am trying to remove the ItemStack a player right clicks on from the inventory, but nothing seems to work.
    setting the ItemStack to Material.AIR does not work, neither does setting the amount to 0. Different Materials than air and numbers higher than 0 do change the item stack, though.
    Inventory.remove() removes every matching Item Stack from the inventory, which is also not what I want.

    Am I missing something? How do I delete a specific ItemStack in the inventory?

    Edit: use InventoryClickEvent.setCurrentItem(ItemStack)
    I'm an idiot, nothing to see here, everybody move along :)
     
Thread Status:
Not open for further replies.

Share This Page