Inventory.yml Tutorial
Here you can modify all aspects of the inventories of PlayerKits 2.
Inventories
There are different inventories on the plugin:
main_inventory: Main inventory opened using the
/kit
command.preview_inventory: Kit preview inventory when you right click a kit item.
buy_requirements_inventory: Inventory that will open when the kit has requirements.
You must not remove these inventories from the config or the plugin will not work!
You can also create your own inventories (like the premium_kits_inventory inventory on the default config), for example to create multiple pages, or even a category system.
Inventories Properties
Each inventory has 3 properties show below:
Slots
Defines the amount of slots this inventory will have. You can only use 9, 18, 27, 36, 45 or 54.
Title
Defines the title of this inventory.
You can use the %kit%
variable to display the kit name, only on buy_requirements_inventory
and preview_inventory
inventories.
Item Slot
Position of an item in the inventory. For a much simpler way of placing items on inventories you can use some formats:
Format 1
This will set an item on the slot 0. Format:
<slot>:
<item>
Format 2
This will set the same item on slots 0, 8 and 16. Format:
<slot1>;<slot2>;<slotN>:
<item>
Format 3
This will set the same item from slots 0 to 8 (0, 1, 2, 3, 4, 5, 6, 7, 8). Format:
<slot1>-<slotN>:
<item>
Combining formats
This will set the same item on slots 0 to 7, 9, and 17 to 26.
Item Slots Properties
On these item slots you can create your own items.
Item
This is the item itself. Use the guide from HERE to create them.
Open Inventory
Add this option to open another inventory when the player clicks on this item.
You can use open_inventory: previous
to open the previous PlayerKits 2 inventory the player was in.
Click Commands
Adds a list of commands to be executed from the console when clicking on the item.
You can use the
msg %player%
command to send a simple message to the player.You can use the
close_inventory
text to close the player inventory when clicking on the item.
Type: Kit
You can place a kit display item on the GUI by using the type: kit
option. If you do so, all other properties are ignored. Format:
type: "kit: <kit_name>"
Type: Buy Yes, Buy No
On the buy_requirements_inventory
inventory you can set the type of an item to buy_yes and buy_no:
buy_yes: Clicking the item will proceed to buy the kit.
buy_no: Clicking the item will send you back to the previous inventory.
Last updated