diff --git a/src/main/kotlin/net/axay/kspigot/gui/GUIBuilder.kt b/src/main/kotlin/net/axay/kspigot/gui/GUIBuilder.kt index 8f8b4b04..7dadf8a7 100644 --- a/src/main/kotlin/net/axay/kspigot/gui/GUIBuilder.kt +++ b/src/main/kotlin/net/axay/kspigot/gui/GUIBuilder.kt @@ -188,13 +188,28 @@ class GUIPageBuilder( onClick: (clickEvent: GUIClickEvent, element: E) -> Unit ) = GUISpaceCompound(type, iconGenerator, onClick) + /** + * Defines an area where the content of the given compound + * is displayed. + */ + fun compoundSpace( + slots: InventorySlotCompound, + compound: GUISpaceCompound + ) { + compound.addSlots(slots) + defineSlots( + slots, + GUISpaceCompoundElement(compound) + ) + } + /** * Creates a new compound, holding data which can be displayed * in any compound space. * This compound is strictly a rectangle. * The space is automatically defined. */ - fun createCompound( + fun createRectCompound( fromSlot: SingleInventorySlot, toSlot: SingleInventorySlot, iconGenerator: (E) -> ItemStack, @@ -215,21 +230,6 @@ class GUIPageBuilder( } } - /** - * Defines an area where the content of the given compound - * is displayed. - */ - fun compoundSpace( - slots: InventorySlotCompound, - compound: AbstractGUISpaceCompound - ) { - compound.addSlots(slots) - defineSlots( - slots, - GUISpaceCompoundElement(compound) - ) - } - /** * By pressing this button, * the user scrolls forwards or backwards in the compound.