Variable: insert - ScreamingSandals/SimpleInventories GitHub Wiki
insert
This variable inserts contents of items variable into another item or items.
Yaml:
# Example
- insert: main
items:
- STONE
- DIRT
- stack: LIME_WOOL
id: myMenu
# Example 2
- insert:
- main
- $myMenu # it will be inserted to current end of this category
- $myBlock # it will be inserted to start of this category on its initialization
items:
- STONE
- DIRT
- stack: GLOWSTONE
id: myBlock
Groovy:
inventory {
// Example
insert ('main') {
item('STONE')
item('DIRT')
}
item('LIME_WOOL') {
id '$myMenu'
}
// Example 2
insert ([
'main',
'$myMenu', // it will be inserted to current end of this category
'$myBlock' // it will be inserted to start of this category on its initialization
]) {
item('STONE')
item('DIRT')
}
item('GLOWSTONE') {
id 'myBlock'
}
}