pageChanger

fun pageChanger(slots: InventorySlotCompound<T>, icon: ItemStack, toPage: Int, onChange: (GUIClickEvent<T>) -> Unit? = null)
fun pageChanger(slots: InventorySlotCompound<T>, icon: ItemStack, toPage: Int, shouldChange: (GUIClickEvent<T>) -> Boolean? = null, onChange: (GUIClickEvent<T>) -> Unit? = null)

This is a button which loads the specified toPage if clicked.