Noob question - Close Inventory

Discussion in 'Plugin Development' started by nemakulis, Feb 15, 2011.

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

    nemakulis

    Hello, how can I close inventory, if I catch inventory open event with
    Code:
    pm.registerEvent(Event.Type.INVENTORY_OPEN,this.playerListener, Event.Priority.High, this);
     
  2. Offline

    Valrix

    Inventory events haven't been added yet. I've been waiting on them myself. The issues is with the way inventory updates and they've been working on a fix.
     
  3. Offline

    nemakulis

    But is there any way I can prevent players from opening inventory?
     
  4. Offline

    Valrix

    No...and why would you want to?
     
  5. Offline

    phaed

    This is a rhetorical question that should *never* be asked.
     
  6. Offline

    Edward Hand

    While inventory events haven't been implemented yet (for reasons I can't fathom), you can close the inventory (or other window) very easily:
    Code:
    CraftPlayer cPlayer = (CraftPlayer)thePlayer;
    cPlayer.getHandle().t()
    But without knowing when their inventory is open, there's no good way to use this.
     
Thread Status:
Not open for further replies.

Share This Page