Creating a GUI within a GUI

Status
This thread has been locked.

Torch

Banned
Feedback score
3
Posts
35
Reactions
22
Resources
0
Hello! I am still learning the full Bukkit library and I am trying to work my way around these errors as best as possible as I want to get better as a developer however for future references I would appreciate some help on what exactly I'm doing wrong. I have created a GUI with items within it however I want it so when I click on items it will open another GUI allowing you to purchase an upgrade. I am stuck trying to open a GUI within the original GUI.
2b824fa12ee5936af966c808f7dfc433.png

353ecedbfe9d5912dd06ae78dad3a4bd.png



For the first GUI I have a command to open it and the second gyazo is the GUI being created and has all of the GUI values within it.

For the second GUI I tried the same thing on click event but when I used "createMenu();" again I got a error for saying the command was duplicated. I know there are other ways to make GUI's however how would I be able to open the second GUI without it saying that its a duplicate?
c2e92c7c7c8c4b742a8281d147696ca4.png

7a3894fa275c08099798f8f90e9b4da9.png
 
Banned forever. Reason: Ban Evading (Cade GOD)
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Missionary

Premium
Feedback score
2
Posts
313
Reactions
245
Resources
0
Hello! I am still learning the full Bukkit library and I am trying to work my way around these errors as best as possible as I want to get better as a developer however for future references I would appreciate some help on what exactly I'm doing wrong. I have created a GUI with items within it however I want it so when I click on items it will open another GUI allowing you to purchase an upgrade. I am stuck trying to open a GUI within the original GUI.
2b824fa12ee5936af966c808f7dfc433.png

353ecedbfe9d5912dd06ae78dad3a4bd.png



For the first GUI I have a command to open it and the second gyazo is the GUI being created and has all of the GUI values within it.

For the second GUI I tried the same thing on click event but when I used "createMenu();" again I got a error for saying the command was duplicated. I know there are other ways to make GUI's however how would I be able to open the second GUI without it saying that its a duplicate?
c2e92c7c7c8c4b742a8281d147696ca4.png

7a3894fa275c08099798f8f90e9b4da9.png
Well you have two methods with the exact name. Try naming the second method something like createMenu2 or what ever your preference is.
 

Torch

Banned
Feedback score
3
Posts
35
Reactions
22
Resources
0
Well you have two methods with the exact name. Try naming the second method something like createMenu2 or what ever your preference is.
Would that work? I thought that's what changing the original "Player" to "Player2" within the parenthesis would do however I will try it out, thank you![DOUBLEPOST=1495409713][/DOUBLEPOST]
Well you have two methods with the exact name. Try naming the second method something like createMenu2 or what ever your preference is.
Wow, I can't believe it was that simple I really appreciate the response as it worked!
 
Last edited:
Banned forever. Reason: Ban Evading (Cade GOD)
Status
This thread has been locked.
Top