一个允许玩家创建票务商店 GUI 以从 Traincarts 插件购买车票的插件。
有关插件使用的完整信息,请访问 GitHub 上的 Wiki
使用方法
- 运行
/train ticket create <Traincarts ticket name> 创建一张 Traincarts 车票。
- 运行
/tshop ticket create <Traincarts ticket name> 获取一个“GUI 车票”物品。
- 运行
/tshop gui create <Gui ID> 创建一个商店 GUI。
- 运行
/tshop gui rename <new display name> 更改 GUI 标题。
- 运行
/tshop gui edit <Gui ID> 编辑 GUI。
- 将插件给予你的车票拖入打开的背包中。

- 运行
/tshop gui open <Gui ID> 打开商店 GUI。点击车票即可将其放入你的背包。
打开 GUI 的其他方法
告示牌
创建具有以下格式的告示牌:
[tshop]
<gui ID>
其他任意文本

右键点击告示牌以打开商店 GUI。
链接
链接是一个强大的工具,允许玩家将多个 GUI “链接”在一起。
要开始使用,你必须至少已经创建了两个 GUI。例如,我们可能运行了:
/tshop gui create mainline
/tshop gui create subline
我们希望 mainline GUI 能够链接到第二个 GUI subline。
首先,我们必须创建一个新的“链接”。为此,我们可以运行:
/tshop link create <linked Gui ID>
/tshop link rename <new display name>
在我们的示例中,这看起来像这样:
/tshop link create subline
/tshop link rename "<yellow>Subline Tickets"
这将给我们一个类似这样的链接物品:

有了这个新链接,我们可以运行:
并将链接物品拖放到 mainline GUI 中的任意位置,甚至可以放在其他车票之间。

现在,当玩家打开 mainline GUI 时,他们将能够点击该链接物品。这将把他们重定向到 subline GUI。

还可以设置链接物品将链接到的目标页面。
例如:
/tshop link setDestinationPage 10
将使点击链接时尝试将玩家重定向到目标 GUI 的第 10 页。如果 GUI 中的页面数量不足,它将默认为可能的最高页面。
A plugin which allows players to create ticket shop guis for purchasing tickets from the Traincarts plugin.
FOR FULL INFORMATION ABOUT PLUGIN USAGE, PLEASE VISIT THE WIKI ON GITHUB
How to use
- Run
/train ticket create <Traincarts ticket name> to create a Traincarts ticket.
- Run
/tshop ticket create <Traincarts ticket name> to get a "gui ticket" item.
- Run
/tshop gui create <Gui ID> to create a shop Gui.
- Run
/tshop gui rename <new display name> to change the Gui title.
- Run
/tshop gui edit <Gui ID> to edit the Gui.
- Drag the ticket you were given by the plugin into the inventory that opens.

- Run
/tshop gui open <Gui ID> to open the shop GUI. Click on a ticket to get it in your inventory.
Other methods of opening the GUI
Signs
Create a sign with this format:
[tshop]
<gui ID>
Any other text

Right click on the sign 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
/tshop gui create subline
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 ID>
/tshop link rename <new display name>
In our example, this would look something like:
/tshop link create subline
/tshop link rename "<yellow>Subline Tickets"
This should give us a link item which looks something like this:

With this new link, we can run:
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. If there aren't that many pages in the Gui, it will default to the highest page possible.
评论 0
登录后参与评分
还没有评论,来抢沙发吧