Detect canceling of trying to place wrong items in container?

Discussion in 'Plugin Development' started by darkhelmet, Jan 10, 2013.

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

    darkhelmet

    If some tries to place a door in a brewing stand (for example), the InventoryClickEvent fires. I have logic that detects what's going in and out and it's very well tested, but when you place an item that the system rejects, the event doesn't appear to ever say this. It's not canceled, it doesn't seem to contain any extra info that the item was rejected.

    The getResult() looked promising but all it does it return the DEFAULT type.

    http://jd.bukkit.org/apidocs/org/bukkit/event/inventory/InventoryClickEvent.html#getResult()

    http://jd.bukkit.org/apidocs/org/bukkit/event/Event.Result.html

    Neither document was helpful.
     
  2. Offline

    Lolmewn

    What eventpriority are you using?
     
  3. Offline

    fireblast709

    debug your code, to get a view of the execution flow
     
Thread Status:
Not open for further replies.

Share This Page