Skip to content

A Spigot plugin which extends the functionality of the Traincarts Plugin by introducing player-made ticket shops into the game

Notifications You must be signed in to change notification settings

DNAmaster10/TraincartsTicketShop

Repository files navigation

A plugin which allows players to create ticket shop guis for purchasing tickets from the Traincarts plugin.

How to use

  • 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. image
  • Run /tshop gui open <name> to open the shop GUI. Click on a ticket to get it in your inventory.

Other methods of opening the GUI

Citizens NPCs (coming soon)

Entities (coming soon)

Signs

Create a sign with this format:


[tshop]
<gui name>

image

Right click on it to open the shop GUI.

Links

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:

image

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.

image(1)

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.

Untitled-2024-01-25-2133

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.

About

A Spigot plugin which extends the functionality of the Traincarts Plugin by introducing player-made ticket shops into the game

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages