Requirements and results - Staartvin/Graphical-Shop GitHub Wiki
Requirements and results
What kind of requirements are there to use? What do they do? This page has a list of all requirements and results you are able to use.
Requirements
Requirements can be used to check for a certain condition. An example would be: 'a player has at least x money in his account' or 'a player needs these items'.
A list of requirements is below:
Items
This requirement can check if a player has one or more items. You'll need to specify an itemstack per line.
The format of the itemstack would be: item id;amount;extra value
If you wanted to check whether a player has at least 10 red wool in its inventory, you could use the items requirement. You would specify on one line '35;10;14'. 35 being the item id of wool, 10 being the amount and 14 being the extra data (which specifies it's red wool). The extra data value does not have to be present. If you wanted to check for 2 diamond swords, you could just do '276;2'.
You can also use the word 'this' to describe the item id you specified as the icon.
Money
Graphical Shop is also able to check how much money a player has. You only have to specify the amount of money. This can either be a round number, such as 1000, or a decimal number, such as 250.5.
Results
Results can be used to perform certain actions. You could for example give a player some items, perform commands, or give/take money!
A list of results:
Items
You can specify a list of items you want the player to give. The format of specifying the item is exactly the same as for the 'items' requirement. For a reminder:
"The format of the itemstack would be: item id;amount;extra value"
You'll have to specify each itemstack at a new line. You can also use the word 'this' to describe the item id you specified as the icon.
Commands
You can also let Graphical Shop perform commands. These commands will be performed as if they were typed in the console. You can use the %player% variable to specify the player.
Money take
You can also take money from players. Just specify the amount you want to take. This can either be a decimal number (250.2) or a round number (1500).
Money give
Only taking money wouldn't be fun, now would it? Giving money is also possible. Once again, just specify the amount you want to give. This can either be a round number or decimal one.