pageChanger

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

fun pageChanger(slots: InventorySlotCompound<T>, itemStack: ItemStack, toPage: Int, onChange: (InventoryGUIClickEvent<T>) -> Unit?)