Force open a player's inventory

Discussion in 'Plugin Development' started by JUSTCAMH, Apr 28, 2015.

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


    I want to have it that when a player closes a custom inventory (using the PlayerCloseInventoryEvent), their normal player inventory will open instead of the inventory closing. So I can do everything, I just can't figure out how to open a player's inventory. I tried:
    however this open's their inventory space only, similar to a chest. I want it to open a player's normal inventory, the one that opens when you press e.
  2. Offline


  3. Offline


  4. Offline


    Closest thing you got AFAIK. It would do no good to cast to a PlayerInventory because Player#getInventory() already returns one.
  5. Offline


    Ah yes, sorry. Didn't check the docs or remember.
  6. Offline


    If the inventory is custom , just get their inventory with a player.openinventory(player.getinventory)

    You might close the first one before or add a lil shceduler. Cuz the event is called before the inventory is closed.
  7. Offline


    @caderape Next time, try reading the original post
    Not trying to be mean
  8. Offline

    I Al Istannen

Thread Status:
Not open for further replies.

Share This Page