inventory-framework

Minecraft Inventory API framework

MIT License

Stars
119
Committers
15

Bot releases are visible (Hide)

inventory-framework - v2.5.4-rc.1 (10-09-2022)

Published by DevNatan about 2 years ago

πŸ› Bug fixes

  • Fixed context data inheritance (#219)
  • Fixed NullPointerException in context paginator (#224)
  • Fixed fallback navigation item retrieval compatibility (#228)
  • Fixed "Update job not started" error (#232)
  • Pagination context getSlot() returning index instead of current slot (#235)
  • Context getCurrentItem always returning null (#235)
  • Try to fix ConcurrentModificationException on open (#237)
  • Fixed page switch issues due to dynamic pagination source (#233, #238)
  • Fixed wrong update interval when using schedule update with Duration as parameter (#236)

πŸŽ‰ New Features

πŸ“˜ Documentation

  • Code preview on Wiki.

🧩 API changes

  • Provide unique element index for pagination (#239)

πŸ”§ Other changes

  • Bump com.diffplug.spotless from 6.9.1 to 6.10.0 (#214)
  • Update IF-specific bStats charts (#227)

πŸ› οΈ Internal changes

  • Now clear() supports immediate clear when context is on entity container (#235)

  • Bump com.diffplug.spotless from 6.9.1 to 6.10.0 (#214)

Full Changelog: https://github.com/DevNatan/inventory-framework/compare/2.5.4-beta...v2.5.4-rc.1

inventory-framework - v2.5.4-beta

Published by DevNatan about 2 years ago

πŸ› Bug fixes

  • Fixed pagination navigation (#196)
  • User-defined pattern render on paginated views (#196)
  • Optimize and fix some pagination issues like "At least one pagination must be set" (#201)
  • Provided/asynchronous source is now updated on container when view is updated (#201)
  • Close handler Bukkit player retrieval (#202)
  • Allow users to ignore navigation item factory (#205)
  • Allow users set navigation item slot by item.withSlot(...) (#206)
  • Fix "Slot conversion not supported" (#208)
  • Instantiate entity container properly, solve isOnEntityContainer checks (#211)

πŸŽ‰ New Features

  • Auto-slot-fill through availableSlot(...) and unified layout, use layout on regular and paginated views (#174)
  • Custom UnknownReferenceException to ref(String) and nullable ref refOrNull(String) (#210)
  • Allow slot clear on update, a slot can now be cleared with clear() (#209)

⚑Performance improvements

  • Removed nextTick from updateSlot call (#203)
  • Layouts are now resolved on view initialization not on render (#174)

🧩 API changes

  • Asynchronous pagination provider CompletableFuture value changed from List<T> to List<? extends T>
  • ItemWrapper asBukkitItem and isEmpty is now public (#201)
  • New AsyncPaginationDataState onSuccess(BiConsumer<..., List<? extends T>>) to get result on example
  • AbstractView#nextTick is now public
  • Shortcut to item.onRender with item.rendered(::createItem) and item.onUpdate with item.updated(::updatedItem)

πŸ“˜ Documentation

  • Version compatibility table updated on Wiki
  • Improved setSource(Function<...>) documentation with a real world example

πŸ› οΈ Internal changes

  • Pagination source now can only be set once (#201).

πŸ”§ Other changes

  • Added license scan report and status (#198)
  • Update mockito monorepo to v4.7.0 (#197)
  • Update plugin com.diffplug.spotless to v6.9.1 (#194)
  • Update dependency gradle to v7.5.1 (#189)
  • Pipeline interceptor tests (#199)

Full Changelog: https://github.com/DevNatan/inventory-framework/compare/2.5.3...v2.5.4-beta

inventory-framework - v2.5.3

Published by DevNatan about 2 years ago

πŸ› Bug fixes

πŸ› οΈ Other changes

Full Changelog: https://github.com/DevNatan/inventory-framework/compare/2.5.2...2.5.3

inventory-framework - v2.5.2

Published by DevNatan over 2 years ago

πŸ› Bug fixes

πŸ”§ API changes

πŸ› οΈ Internal changes

Full Changelog: https://github.com/DevNatan/inventory-framework/compare/2.5.1...2.5.2

inventory-framework - v2.5.1

Published by DevNatan over 2 years ago

πŸ› Bug fixes

Full Changelog: https://github.com/DevNatan/inventory-framework/compare/2.5.1-rc.2...2.5.1

inventory-framework - v2.5.1-rc.2

Published by DevNatan over 2 years ago

πŸ› Bug fixes

πŸ₯‰ Third-Party

πŸ› οΈ Internal changes

inventory-framework - v2.5.1-rc.1

Published by DevNatan over 2 years ago

In this release the entire internal code has been completely rewritten, new code is abstracted correctly to adapt possible implementations for other platforms in the new future and to make life easier for new contributors when they touch the code (#89).

πŸŽ‰ New Features

  • Added support for more inventory types (#58)
  • Lazy pagination source (#72)
  • Asynchronous Opening (#76)
  • Item References (#80)
  • Slot context item patch (#112)
  • Asynchronous Pagination (#113)
  • Now onItemHold, onItemRelease and onMoveOut can be applied per-item
  • Allow user defined layout (custom character) in context scope

πŸ› Bug fixes

  • Fixed context cancellation based on interceptors call order
  • Fixed a bug where when the paginated view was updated with empty source the items from the previous pagination were not cleared
  • View update job error (#106)
  • Fixed error that causes context to be cleared randomly by the Garbage Collector (#107)
  • An exception will be thrown if the user does not define any paging data
  • Fixed a bug that pagination data of multiple contexts in the same view conflicts with each other

πŸ”§ API changes

  • More fluent ViewFrame API with chain accessors
  • Removed pollution of overridable methods in View that shouldn't be overridden
  • onClickOutside and onHotbarInteract handlers now deprecated
  • Paginated view offset and limit now deprecated
  • Page switch methods returns a boolean to let user know if page switch was successful
  • User-defined layout pattern method signature changed
  • Pagination navigation item methods override now deprecated

πŸ› οΈ Internal changes

  • Prohibit pagination item rendering function use (#104)
  • An exception will be thrown if the user does not define any pagination data source
  • An exception will be thrown if the user changes the state of the view after it has been rendered
  • Bukkit platform implementation now have bStats

πŸ“˜ Documentation

InventoryFramework has been moved from repository readme to Wiki.

inventory-framework - v2.5-CC

Published by DevNatan over 2 years ago

πŸ› Bug Fixes

  • Fixed StackOverflowError if context is invalidated while context inventory's is being opened to the player (thanks to @devwckd)
inventory-framework - v2.5

Published by DevNatan over 2 years ago

This version of IF comes with some significant performance changes related to paging inventory and regarding defining items in the same, it is now possible for you to define more than one item for the same slot which will be rendered according to the rendering priority.

πŸŽ‰ New Features

  • Inheritable context data (#65)
  • User-defined paginated view layout pattern (#70)
  • Custom "on click outside" inventory handler (#55)

πŸ› Bug Fixes

  • Pagination item overrides already set item on re-render (#81)
  • Now errors are propagated by default if they occur inside a handler (#83)

πŸ”§ API changes

  • View not longer implements Closeable (#82)

πŸ“˜ Documentation

  • Replaced 'BLAZE_ROW' to 'BLAZE_ROD' in readme (thanks to @mattnicee7) (#75)

πŸ₯‡ New Contributors

  • @mattnicee7 made their first contribution in #75
inventory-framework - v2.4.3

Published by DevNatan over 2 years ago

Bug Fixes

  • Error handling now works properly onOpen and onRender (#51).

API changes

  • onHotbarInteract(...) is now stable;
  • Possibility to get the pagination source from ViewContext (#62);
  • Allow getting current title from context inventory (#56);
  • New PaginatedView(rows) constructor (#49).

Internal changes

  • An exception is thrown when trying to manipulate or access the context inventory before opening it (#63);
  • The inventory will not be displayed to the player if the initial rendering is cancelled. (#60).

Documentation

  • View options details on readme (#66).
inventory-framework - v2.4.2

Published by DevNatan over 2 years ago

Bug fixes

  • Previous and next page items aren't displayed if item slot is manually defined (#44)
  • Error handler is not working in paginated inventory (#41)

Build System changes

  • Jetbrains annotations is now a transitive dependency (#45)
inventory-framework - v2.4.2-rc.1

Published by DevNatan over 2 years ago

Bug fixes

  • getClickOrigin() from ViewSlotContext returning null.
  • onItemRelease(...) is no longer called if the global click was cancelled.

Optimizations

We've changed a few things in the click listener that make us skip some steps depending on conditions that will slightly increase the performance of click handlers. Also, now the inventory drag event checks is skipped if the View doesn't have cancelOnDrag set explicitly.

Internal changes

  • NOTHING and UNKNOWN click types are now cancelled by default, we will soon provide options to change this behavior.
  • A IllegalStateException is throw when player context is not found and he has a View opened.
inventory-framework - 2.4.1

Published by DevNatan over 2 years ago

Bug fixes

  • It's now possible to interact with items in the player's inventory while the View is open independently.
  • Fixed bug that allows player move items to the View inventory even if View is configured to cancel clicks or cancel move in by shift clicking items on their inventory.
  • Clicks being cancelled in player inventory if view is marked to cancel on click even player is not clicking in the view inventory are not allowed.

Features

Internal changes

  • Now closeOnOutsideClick View option are enabled by default. You can disable this with view.setCloseOnClick(false).

Build System changes

  • Now project is built on JDK 8 and targets Java 8 (thanks to @luiz-otavio #40)
inventory-framework - 2.4.0

Published by DevNatan over 2 years ago

Bug fixes

  • Slot conversion to near-limited row was fixed (#32).
  • Now an exception is thrown when trying to open a View without the ViewFrame being registered (thanks to @luiz-otavio).
  • CloseViewContext now delegates the original context (thanks to @zAlyson).
  • An exception will be thrown when an inventory tries to be modified in the onOpen View handler.

Features

  • Added setCloseOnClickOutside option to close View if player clicks outside the inventory screen.
  • Use scheduleUpdate on View to schedule automatic view updates (useful for animations).

API changes

  • Introduced a more intuitive way to schedule view updates, ScheduledView is now deprecated and will be removed soon.
  • Allow PaginatedView layout removal by specifying null on setLayout.
  • Some public methods from VirtualView and View become internal, and fast path methods (to ItemStack)
    from VirtualView becomes @Deprecated and will be removed soon.

Internal changes

  • Moved ReflectionUtils to a different package to prevent conflicts with other libraries/plugins (thanks to @GeorgeV220) (#31).
inventory-framework - 2.3.2

Published by DevNatan over 2 years ago

Bug Fixes

  • Dynamic title update (ViewContext#updateTitle) support on 1.17 and 1.18 (#25).
  • Some contexts came with null click origin (#27).
  • Now an exception is thrown when a View is registered multiple times.
  • onItemRelease now works with PaginatedView (#26).

API changes

  • Expose VirtualView.toSlot to convert slot numbers (thanks @luiz-otavio).
  • Some methods of the ViewFrame class have been marked @Deprecated as they will be removed in the near future and should not be used.
inventory-framework - 2.3.1

Published by DevNatan almost 3 years ago

  • Assign deprecated annotation in View#getRows for dynamic views (#19)
  • View auto update and Spigot 1.16.5 API support (#18)
Badges
Extracted from project README
Build CodeQL Publication FOSSA Status Maven Central FOSSA Status