Solved GUI to open another GUI?

Discussion in 'Plugin Development' started by dlndcrdso, Oct 30, 2018.

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

    dlndcrdso

    I want to make it so when you click a block in a GUI it takes you to another but it won't seem to work?
    Neither of these 2 following pieces of code seem to work, and I can't find another way to do it
    Trying to use p.openinventory in the if(clicked) statement: https://pastebin.com/SBRWdLj1
    Trying to make an entirely new class for the new GUI in the if(clicked) statement: https://pastebin.com/iKEehdVe
    Please help
     
  2. Offline

    timtower Administrator Administrator Moderator

    @dlndcrdso Close the old inventory first, then open the new one a tick later.
     
  3. Offline

    The_Spaceman

    That should not be the problem. If I open one while the player has an open Inventory it works just fine...

    @dlndcrdso how are you detecting if a inventory should be opend?
     
  4. Offline

    dlndcrdso

    It's ok @The_Spaceman I just did what timtower said, closed the original inventory then waited 5 ticks before opening the second, thanks for your help though.
     
    The_Spaceman likes this.
Thread Status:
Not open for further replies.

Share This Page