Inventory.yml Tutorial
Here you can modify aspects of the inventories of ConnectTheBlocks.
Inventories
The plugin has 2 inventories.
Main inventory: Main inventory opened using
/ctb
. Categories will appear here. You can even create more inventories like this one.Category/levels inventory: Inventory that show the levels of a category. The structure of this inventory and position of items CAN'T be modified. However, you can still modify each item individually.
The main_inventory inventory must not be removed from the inventory.yml file. You can create your own inventories following the same format under the inventories path. if you need to.
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.
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:
Format 2
This will set the same item on slots 0, 8 and 16. Format:
Format 3
This will set the same item from slots 0 to 8 (0, 1, 2, 3, 4, 5, 6, 7, 8). Format:
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 created inventory when the player clicks on this item.
Click Actions
Adds a list of actions to be executed when clicking on the item. List of actions HERE.
Type: Category
You can place a category display item on the GUI by using the type: category
option. If you do so, all other item properties are ignored. Format: type: "category: <category_name>"
Level Inventory Types
These will be the "types" or "shapes" of levels.
For example, the 5x5 inventory type represents an inventory where there is a central empty square surrounded by black stained glass panels.
As you can see, the format is the same as to the inventories config, however you can only use the item property.
You can use the optional property
display_name
to set a custom name to be displayed on inventories.By default there are 7 shapes: 5x5, 6x6, 7x6, 8x6, 9x6, custom_shape_1 and custom_shape2.
You can create your own inventory types/shapes. You can use this site to help you with the slots: https://mcutils.com/inventory-slots
Common Items
These are common items that are used on different inventories.
Level Selection
Fill
Item to decorate the level selection inventory.
Go Back
Item to go back to the main inventory.
Next Levels
If the category has more than 40 levels, this item represents a button to go to the next page.
Previous Levels
If the category has more than 40 levels, this item represents a button to go to the previous page.
On Level
Go Back
Item to go back to the level selection.
Selected Block
Item that displays the player's current selected block. You can use %block_id%
and %block_display_name%
variables which are grabed from the game_block configuration.
Selected Block None
Item to show when the player doesn't have a selected block.
Placed Block
The block that the player places on the inventory. You can use %block_id%
and %block_display_name%
variables which are grabed from the game_block configuration
Placed Block Default
The block that the level has by default. You can use %block_id%
and %block_display_name%
variables which are grabed from the game_block configuration.
Last updated