From a988535c57f033f33070e9d574788fe9badf503a Mon Sep 17 00:00:00 2001 From: bluefireoly Date: Mon, 19 Oct 2020 02:27:40 +0200 Subject: [PATCH] Update InventoryGUIBuilder.kt --- .../net/axay/kspigot/inventory/InventoryGUIBuilder.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 }