Is it possible to have a GUI?

Discussion in 'CommandHelper' started by MPKingJulian, Aug 6, 2017.

  1. MPKingJulian

    MPKingJulian New Member


    I was interested in having a GUI open on command on my server. When you open a GUI I want to have a bunch of items so when you click them it runs a command and closes the GUI. I can't find any methods though.

    I'm not really sure how to do it.

  2. PseudoKnight

    PseudoKnight Well-Known Member Developer

    The CHVirtualChests extension can create virtual inventories to help you here.

    It's mostly creating a virtual chest, binding the inventory_click event, and checking if the player is in a virtual chest with pget_virtualchest(). There's a lot of ways of triggering functionality with the clicks, though.
  3. MPKingJulian

    MPKingJulian New Member

    I'm a little bit confused on how you do this and I could not find any examples online. Are there any examples anywhere? I am not sure how to create a virtual chest.

    Thanks again!
  4. PseudoKnight

    PseudoKnight Well-Known Member Developer

    Surprised you didn't find any examples. You create a virtualchest with create_virtualchest(). There's function descriptions in the extension documentation as well as examples there, here in the forums, and in other places like my github repo.