A plugin which allows players to create ticket shop guis for purchasing tickets from the Traincarts plugin.
- Run
/train ticket create <ticket name>
to create a Traincarts ticket. - Run
/tshop ticket create <ticket name> <display name of ticket to use>
to get a "gui ticket" item. - Run
/tshop gui create <name> <display name>
to create a shop GUI. - Run
/tshop gui edit <name>
- Drag the ticket you were given by the plugin into the inventory that opens.
- Run
/tshop gui open <name>
to open the shop GUI. Click on a ticket to get it in your inventory.
Create a sign with this format:
[tshop]
<gui name>
Right click on it to open the shop GUI.
Links are a powerful tool which allows players to "link" multiple guis together.
To get started, you must have at least two guis already created. For example, we may have run:
/tshop gui create mainline Mainline Tickets
/tshop gui create subline Subline Tickets
We may want to have it so that the gui mainline
links to the second gui, subline
.
Firstly, we must create a new "link". To do this, we can run:
/tshop link create <linked gui name> <display name>
In our example, this would look something like:
/tshop link create subline Subline Tickets
This should give us a link item which looks something like this:
With this new link, we can run:
/tshop gui edit mainline
and drag and drop the link item anywhere within the mainline
gui, even amongst other tickets.
Now, when a player opens the mainline
gui, they will be able to click the link item. This will redirect them to the subline
gui.
It's also possible to set the destination page that a link item will link to.
For example:
/tshop link setDestinationPage 10
will make it so that when the link is clicked, it will try to redirect the player to page 10 of the destination gui.