Check if specific item is in chest then remove

Discussion in 'Plugin Development' started by revivedbear, Nov 20, 2017.

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

    revivedbear

    Hi, (I am using craftbukkit with spigot) and I need to check if a specific item with a specific name has been placed in a specific chest, and if so, then remove the item. I am fairly new to this and all other threads haven't really been useful to me, thanks.
     
  2. Offline

    timtower Administrator Administrator Moderator

    @revivedbear Loop over the inventory.
    Check the name, if correct: remove item.
     
  3. Offline

    revivedbear

    Hi, sorry for stupid question but how would I loop over the inventory of a specific chest?
     
  4. Offline

    timtower Administrator Administrator Moderator

  5. Offline

    MightyOne

    If you want to directly check the item when put inside a chest take the InventoryClickEvent. i you want to check for the item when the chest gets closed InventoryCloseEvent but idk... when are you going to look for that item?
     
Thread Status:
Not open for further replies.

Share This Page