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.
Inventories Properties
Each inventory has 3 properties show below:
inventories:
main_inventory:
slots: 27
title: "&4&lCTB &8- &4Levels"
0-8;9;17;18-26:
item:
id: "BLACK_STAINED_GLASS_PANE"
name: " "
11:
type: "category: easy"
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:
<slot>:
<item>
0:
item:
id: BLACK_STAINED_GLASS_PANE
name: " "
Format 2
This will set the same item on slots 0, 8 and 16. Format:
<slot1>;<slot2>;<slotN>:
<item>
0;8;16:
item:
id: BLACK_STAINED_GLASS_PANE
name: " "
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>
0-8:
item:
id: BLACK_STAINED_GLASS_PANE
name: " "
Combining formats
This will set the same item on slots 0 to 7, 9, and 17 to 26.
0-7;9;17-26:
item:
id: BLACK_STAINED_GLASS_PANE
name: " "
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.
0-8;9;17;18-26:
item:
id: "BLACK_STAINED_GLASS_PANE"
name: " "
Open Inventory
Add this option to open another created inventory when the player clicks on this item.
49:
item:
id: "DIAMOND_BLOCK"
name: "&eOther Levels"
open_inventory: other_levels
Click Actions
Adds a list of actions to be executed when clicking on the item. List of actions HERE.
36:
item:
id: "ARROW"
name: "&7Go Back to an external Inventory"
click_actions:
- "message: &aOpening the main server menu"
- "console_command: chestcommands open %player% menu_server"
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>"
22:
type: "category: easy"
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.

level_inventory_types:
custom_1:
display_name: "Custom Shape"
0;1;7-10;16-19;25-28;34-37;43-53:
item:
id: BLACK_STAINED_GLASS_PANE
name: " "
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.
fill:
id: BLACK_STAINED_GLASS_PANE
name: " "
Go Back
Item to go back to the main inventory.
go_back:
id: ARROW
name: "&7Go Back to Categories"
Next Levels
If the category has more than 40 levels, this item represents a button to go to the next page.
next_levels:
id: PLAYER_HEAD
name: "&7Next Levels"
skull_data:
texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTNjMWE0Y2Y0OTUxNGI1N2E3OGMxNWQ0ODRmYzBlYWE4N2YyZmM2NDg3Y2Q1NGFjM2I1ODA3ZjY0YzZhNzJkIn19fQ=="
Previous Levels
If the category has more than 40 levels, this item represents a button to go to the previous page.
previous_levels:
id: PLAYER_HEAD
name: "&7Previous Levels"
skull_data:
texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTQyNDEzY2IyOGNkY2I3ZWRkMGRlY2E2NTRiMjZkNTg0ZDgxNjQ2ZDk0YjgyNWU4NTI5ZGIyZjJkZjMwZTAifX19"
On Level
Go Back
Item to go back to the level selection.
go_back:
id: ARROW
name: "&7Go Back"
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:
id: "%block_id%"
name: "&eCurrent Selected Block"
lore:
- "&7Status: %block_display_name%"
Selected Block None
Item to show when the player doesn't have a selected block.
selected_block_none:
id: BARRIER
name: "&eCurrent Selected Block"
lore:
- "&7Status: &8NONE"
- ""
- "&7Select a Wool 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:
id: "%block_id%"
name: "%block_display_name%"
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.
placed_block_default:
id: "%block_id%"
name: "%block_display_name%"
lore:
- "&7This is a fixed block. You can start"
- "&7placing blocks of the same color"
- "&7alongside this one."
- ""
- "&eLeft Click to select this color."
enchants:
- "FIRE_ASPECT;2"
item_flags:
- HIDE_ENCHANTS
Last updated