In-Game GUI editing

Discussion in 'Plugin Development' started by flash1110, Feb 10, 2015.

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

    flash1110

    Basically, I have a GUI declared in the code with some items. However, when an admin runs a command, the GUI will open and allow them to edit the items in it. I'm stuck on this part.
     
  2. Offline

    Konato_K

  3. Offline

    flash1110

    @Konato_K

    That's not what I'm asking for. I'm asking how to have it when an Admin puts in items into a GUI they are implemented into it.

    Lets say for an example, I have a GUI of logs, and an admin takes all but one slot of logs out, the next time the GUI is opened by a player, they only see one slot of logs.
     
  4. Offline

    Konato_K

    @flash1110 Use the same inventory every time?
     
  5. Offline

    flash1110

    @Konato_K

    What do you mean? I'm using a GUI, and the GUI will be used all times. I need that exact GUI to have the edited items. Do you not understand what I'm saying?
     
  6. Offline

    Konato_K

    @flash1110 Yes, let's say I have an Inventory for normal players to choose team in a minigame, I show the players the same inventory all the time, and I cancell their clicks so the inventory doesn't get modified.

    Then an admin who has a special permission, can change stuff from there and their clicks won't get cancelled, therefore, being able to modify the inventory, since everyone sees the same inventory, it will change for everyone.
     
    bennie3211 likes this.
  7. Offline

    flash1110

    @Konato_K

    That doesn't because it never saves the items to the GUI.
     
  8. Offline

    coasterman10

    Store the Inventory as a variable and set items as needed. It should update properly.
     
  9. Offline

    WinX64

    Are you keeping your inventory or creating a new one everytime someone opens it?
     
  10. Offline

    flash1110

    @WinX64

    I'm currently using a method to create the GUI and then open it. Basically yes, I'm creating a new one.
     
  11. Offline

    WinX64

    Since the inventory will always be the same for everyone, why not creating it once and keeping it? Edit the kept inventory and open the same one for the players. Everyone pretty much said it already.
     
    Konato_K likes this.
Thread Status:
Not open for further replies.

Share This Page