Solved Set Item In A Menu From A Menu

Discussion in 'Spigot Plugin Development' started by DeadlyDeath001, Aug 1, 2015.

  1. Error: My Ender Pearl does not get placed in MenuMain GUI. It does after clicking Gadgets about 2 times. I want it so when I click on Enderperal in Gadgets it will spawn 1 underneath EnderChest in MenuMain GUI with ONE CLICK
    Pictures Explains A thousand Words
    This Is The ERROR:
    Click 1:

    Click 2:
    Click 3: As You Can See There Is No Ender Pearl But when I click on it again it bring me back to Gadgets.
    Click 4:
    Click 5: And Now It shows the ender peral
    #1 DeadlyDeath001, Aug 1, 2015
    Last edited: Aug 2, 2015
  2. I'm not fully understanding what the issue is, but what from i can gather surely you can just:

    1. store the player and whether they have said gadget enabled (i can see you have done so)
    2. check when initializing the menu, if they have said gadget enabled.
    3. determine whether to initialize the epearl item in the menu or not.
  3. Western check when initializing the menu and determine whether to initialize the epearl is all in a inventory click event?
  4. When opening the main menu, check whether or not the player has a gadget enabled. If they do, put the gadget's item in the main menu. if not, do not. In the gadgets menu, when they click on the gadget item, set that the player has that gadget enabled. Make sure you set the player's gadget to enabled before you reopen the main menu inventory.