How to deny items to be removed from a Inventory

Discussion in 'Plugin Development' started by CaLxCyMru, Jun 28, 2013.

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

    CaLxCyMru

    Hello :)!
    I need help, I want to make it so that if there is a item in a inventory, it cant be removed!

    Does any body have any idea how to do this?
     
  2. Offline

    caseif

    Listen to the InventoryClickEvent, check the item, and cancel it if necessary.
     
  3. Offline

    CaLxCyMru

    Thanks dude ^.^

    How do I get the inventory from my Main class, To my listener class? :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  4. Offline

    Faith

    Are you using Hash maps?
     
  5. Offline

    CaLxCyMru

    No I am not.
     
  6. Offline

    Faith

    Sorry I replied to the wrong thread, I had this open in another tab and didn't mean to reply. :eek:
     
  7. Offline

    CaLxCyMru

    Oh right :s Its cool man
     
Thread Status:
Not open for further replies.

Share This Page