OdalitaMenus
OdalitaMenus copied to clipboard
Unfinished wiki
Can I ask you to finish the wiki (pagination, iterators etc.) And you could add an event for closing and opening the menu.
Hey! Yeah I will update the wiki after christmas! And closing event is already present, using MenuContents#events()#onClose(). Every time a player opens a menu, onLoad is called in the MenuProvider, so it's already present, but not in the form of an event.
Thanks for the answer and also for the useful features in the library.
I have a question. I previously used a different inventory framework that supported asynchronous pagination.
However, I couldn't find information on whether or how this works here. In that framework, you could use a CompletableFuture—for example, fetchClansFromDatabase, which would return a list of clans and then process it further, as shown here: https://github.com/DevNatan/inventory-framework/wiki/Pagination#asynchronous-data-source
Is this also possible here? If so, how?
I have a question. I previously used a different inventory framework that supported asynchronous pagination.
However, I couldn't find information on whether or how this works here. In that framework, you could use a CompletableFuture—for example, fetchClansFromDatabase, which would return a list of clans and then process it further, as shown here: https://github.com/DevNatan/inventory-framework/wiki/Pagination#asynchronous-data-source
Is this also possible here? If so, how?
Yes this is possible! Look at the example ObjectPaginationExampleMenu, you can create the pagination and iterator. The addItem supports asynchronous, so you could just add all result objects in the .whenComplete of the observable to the pagination. The batch is optional, but can be used to set all items at once in the menu, to increase a little bit of performance when using filters / sorters. We don't have anything to handle the CompletableFuture, so that's something you have to manage on your end.
Hope this answers your question, let me know if you have any more!