Reopen an inventory

Discussion in 'Plugin Development' started by alex3413, Jul 3, 2016.

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

    alex3413

    I was wondering how to reopen an Inventory only if the player closed it. So if a player clicks on something in the menu it takes them to a new menu but it wouldn't reopen it.

    This is what I have right now.

    GUI CLASS:
    http://pastebin.com/YZyDHUmA

    Reopen Inventory Event:
    http://pastebin.com/yUGLcrbi

    My problem is, whenever they click on an item it takes them to the next menu but then it reopens the main menu.
     
  2. @alex3413 you could wait for the player to press on an item and then simply change the content of the inventory instead of changeing to another one
     
  3. Offline

    alex3413

    I've never tried to do this, how do I do this?
     
  4. Offline

    ArsenArsen

    Oooor just dont reopen it in your event. Youre waiting for it to be closed then reopening it in your event. Plus your event doesnt even open the next inventory.

    NEVER MIND: That was me being dumb. So just do what Shimobi suggested or just schedule the new inventory opening 10 ticks later, so after it reopens this it opens the other one.
     
    Last edited: Jul 4, 2016
Thread Status:
Not open for further replies.

Share This Page