Remove Specified Amount Of Item

Discussion in 'Plugin Development' started by 8thDimension, Jul 25, 2011.

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

    8thDimension

    Hello!

    I am developing a plugin that removes a specified amount of an item from a player's inventory.

    I have looked at the inventory stuff for bukkit and I know how to remove a certain item, but I don't know how to remove a certain amount.

    For example something like /delete dirt 3
    Would remove 3 dirt blocks from the player's inventory.

    I've tried inventory.remove(itemID) but that removes everything. I have created a few bukkit plugins so I at least know a bit about developing, but I'm kinda stumped on inventories. Hopefully someone on the forums can educate me a bit on this.

    Thanks,

    8thDimension

    Ahhah!
    I'll take a look at it. Thanks :3

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

Share This Page