diff --git a/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUIBuilder.kt b/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUIBuilder.kt index 5e0bccee..dc15cfe6 100644 --- a/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUIBuilder.kt +++ b/src/main/kotlin/net/axay/kspigot/inventory/InventoryGUIBuilder.kt @@ -146,6 +146,17 @@ class InventoryGUIPageBuilder( ) ) + fun compoundSpace( + slots: InventorySlotCompound, + compound: InventoryGUISpaceCompound + ) { + compound.addSlots(slots) + defineSlots( + slots, + InventoryGUISpaceCompoundElement(compound) + ) + } + private fun defineSlots(slots: InventorySlotCompound, element: InventoryGUISlot) = slots.withInvType(type).forEach { curSlot -> curSlot.realSlotIn(type.dimensions)?.let { guiSlots[it] = element }