Tutorial & Documentation
Tutorial & Documentation
Tutorial & Documentation
You're here because you want to know how this plugin works, it is really simple and once you get the hang of it, you'll be a master of it. This is the config you'll most likely see when you first use the plugin;

We will be going through all the nodes and explaining what each and every node does, if you don't know what a node is, it is the shop, slots, execution, enchantment, itemname, itemamount, itemcost, mysql field. Each node has sub nodes or keys. But we'll get into that later.
Okay, let's go through each and every node and its sub node so we can see what they do.
Node #1: Shop.
Shop contains two sub nodes (keys) called name & slots.
name is the name of the text that will be displayed on the shop.
For example, if you did this:

You would see an output of:

Now lets have a look at the slots key:

The slots key MUST ALWAYS be a multiple of 9! So, it can be 9, 18, 27, 36, 45, 54, 63, etc... The reason it has to be a multiple of 9 is because each row has 9 slots.
So if you did:

It would produce an output of the image below when someone types /shop:

Node #2: Slots. (where the items are defined in)

That is the default slots node. The items are what will be displayed in the shop.
As you can see, the slots were:
slots:
'1': '1'
'8': '261'
'9': '322:1'
So in the first slot, there would be the item ID of: 1, which is: stone.
The 8th slot, would have the item ID of 261, thus making it a bow.
The last slot (9th one), would make a golden apple. Not just any golden apple, an enchanted golden apple.
You probably noted that there isn't really a second slot, third slot, 4th slot, 5th slot, 6th slot and 7th slot. Well, this doesn't matter. This
just means that slot 2-7 will be empty when the user types /shop.
Thus creating an output of

Node #3: Execution. The Execution node is responsible for executing commands whenever a specific item/slot is clicked. It allows you to set sub nodes which set commands to be executed when clicked.
Default Execution Node & Sub nodes part of the execution node:

execution:
'1': 'say Good things come to those who wait!'
'8': 'say Hello [player]'
'9': 'give [player] diamond 1'
This makes it so that the 1st slot broadcasts to the server "Good things come to those who wait",
the 8th slot says Hello [player], [player] being the variable that represents the person who bought this item.
9th slot giving the player 1 diamond.
NOTE: THE EXECUTION WILL ONLY OCCUR IF THE PLAYER HAS ENOUGH TOKENS TO PURCHASE THE ITEM.
TUTORIAL STILL IN PROGRESS, WILL BE COMPLETED SOON.
Last Edit: 6:40PM AEST.
Comments