Made onClick nullable

This commit is contained in:
bluefireoly
2020-10-30 02:16:09 +01:00
parent 75dc9caa02
commit c287316e17
2 changed files with 6 additions and 6 deletions

View File

@@ -185,7 +185,7 @@ class GUIPageBuilder<T : ForInventory>(
*/
fun <E> createCompound(
iconGenerator: (E) -> ItemStack,
onClick: (clickEvent: GUIClickEvent<T>, element: E) -> Unit
onClick: ((clickEvent: GUIClickEvent<T>, element: E) -> Unit)? = null
) = GUISpaceCompound(type, iconGenerator, onClick)
/**
@@ -213,7 +213,7 @@ class GUIPageBuilder<T : ForInventory>(
fromSlot: SingleInventorySlot<out T>,
toSlot: SingleInventorySlot<out T>,
iconGenerator: (E) -> ItemStack,
onClick: (clickEvent: GUIClickEvent<T>, element: E) -> Unit
onClick: ((clickEvent: GUIClickEvent<T>, element: E) -> Unit)? = null
): GUIRectSpaceCompound<T, E> {
val rectSlotCompound = fromSlot rectTo toSlot
return GUIRectSpaceCompound(