on Close
Sets a handler to be called when this GUI is closed.
This callback will be triggered on GUI close events, allowing you to perform any necessary cleanup or state updates.
Return
The current instance of PaginatedDynamicGUI for method chaining.
Parameters
block
The lambda to execute when the GUI is closed. The instance of PaginatedDynamicGUI will be passed as the receiver.