CraftVentory | Create configurable inventories! [1.17+] icon

CraftVentory | Create configurable inventories! [1.17+] -----

An amazing library that makes inventory configuration and loading easier for developers.




Bug fixes:
  • Fixing a bug in which inventory placeholders were not registered.
  • Fixing a bug in which InventoryStorage#hasData(String, Class<?>) produced false negatives.
Documentation:
  • Improving the README of the project by adding a setup section.
  • Improving the wiki by explaining how to setup the library using the JAR file as dependency.
----------, Dec 17, 2024

Rework:
  • Reworking the way inventories are declared and registered. Introducing an InventoryDescriptor interface which is responsible for declaring inventory properties (providers, placeholders, hooks, config file, etc.). As this is an interface, it will not provide any behavior like the old way. It is then be used to create and register a new InventoryProvider in an InventoryService. By using this, we separate what is provided by the developer and what is provided by the library. The interface also has default methods with no implementation that developers can redefine if they needs to. See the wiki for more information about this new way to register inventories.
  • Reworking the way pagination are provided to be able to dynamically retrieve paginated values depending on the current context. Technically, instead of using a Supplier<List<T>>, using a Function<CraftVentory, List<T>> with the currently opened inventory and all its data as context. This enables to retrieve paginated data depending on the viewer / some inventory properties.
  • Reworking the way item action loaders are registered by using an enum instead of manually adding each loader one by one. This is an internal change to improve the code and has no impact on the behavior of the library.
----------, Dec 15, 2024

Fixing a bug in which where there was no paginated item, the number of pages was 0 instead of 1 (empty page is considered as a valid page).
----------, Dec 8, 2024

Rework:
  • Renaming the InventoryModel interface to InventoryStorage which is more explicit.
  • Renaming the getter CraftVentory#getInventoryModel() to CraftVentory#getInventoryStorage()
Features:
  • Adding a new method in the InventoryStorage interface to check if a data exists by key and type.
  • Adding a shared storage between inventories in the same history.
----------, Dec 8, 2024

Features:
  • Pagination improvements:
    • Improving pagination handling by adding the new PaginationManager class that is specifically responsible of that.
    • Improving pagination registration to keep their current state when opening inventory multiple times. Note: Needed for the inventory history feature.
    • Adding PaginationModel#setCurrentPage(int page) to be able to manually open a specific page in a pagination.
  • New item actions:
    • Adding theUPDATE_CONTENT action to update the whole inventory content.
    • Adding the UPDATE_PAGINATIONS action to update paginations.
  • Adding the InventoryModel class to let developers store properties within an inventory.

  • Hooks: Adding hooks to let developers execute code specifically for an inventory when it is opened, closed or when an item is clicked. Hooks are applied on events (e.g. sub classes of the FastInventoryEvent class). Hooks can be added on the following events:
    • FastInventoryBeforeOpenEvent: Called before opening an inventory.
    • FastInventoryAfterOpenEvent: Called after an inventory has been opened.
    • FastInventoryClickEvent: Called when a player clicks on an item.
    • FastInventoryCloseEvent: Called when an inventory is closed.
  • Inventory history: Adding the tracking of players' inventory history and adding actions to navigate through it. The following actions has been added:
    • BACKWARD: Open a previously opened inventory in the history which is before the current one in the history.
    • FORWARD: Open a previously opened inventory in the history which is after the current one in the history.
    • HOME: Open the root inventory in the history.
    • OPEN_INVENTORY: Open a new inventory and add it to the current history or in a new one.
Rework:
  • Package architecture: Reworking the package architecture to better represent the three layer organization of the library (e.g. config, transform, inventory). This is a breaking change for a more coherent organization of classes.

  • Transformation process: Reworking the transformation process that retrieves and enhance inventory properties from an inventory configuration.
    • The transformation process is now well defined and scoped.
    • Now, all the manipulated inventory properties can be enhanced through custom Data Transfer Objects (DTO) such as title, inventory type, items, paginations, etc.
    • Providers are now able to provide several properties instead of only one (ex: an item and its associated slots).
  • Events: Reworking inventory related event classes (FastInventoryEvent, FastInventoryClickEvent) and adding new events.

  • Inventory handling: Reworking the way inventories are opened and closed to implement the tracking of player's inventory history. Now, an inventory should be opened using methods from the InventoryViewManager interface instead of the ones from the FastInventory interface.
Documentation:
  • Javadoc: Adding javadoc on all the classes of the api package and on the FastInventoryLibrary class.

This update also includes the renaming of the project from FastInventory to CraftVentory which is a more unique name.

For more information about the update, see the milestone 2.0.0 on GitHub.
----------, Dec 7, 2024

Update content:
  • Adding click type condition to execute an action.
  • Adding new item actions : broadcast, sound.
  • Improving the existing message action by replacing single message by a list of messages.
  • Improving the existing player command action by replacing single command by a list of commands.
  • Renaming the existing server command action to console command and replacing single command by a list of commands.
  • Fixing message color parsing for actions that send messages.
Related issues: See closed issues in 1.1.0 milestone on GitHub.
----------, Oct 26, 2024

Resource Information
Author:
----------
Total Downloads: 109
First Release: Sep 26, 2024
Last Update: Dec 17, 2024
Category: ---------------
All-Time Rating:
1 ratings
Find more info at syrows-development.gitbook.io...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings