Configuration changes:
The inventory configuration system has been completely reworked to be easier to maintain and to extend. It now relies on a more "component-like" system with a specific configuration loader for each component, which improve separation of concerns. This rework includes the following changes:
- The ClickActionLoaderFactory class has been replaced by the ClickActionLoaderManager class. The class is no longer parameterized to simplify the code, as no further data sources are planned to be supported.
- Item actions are now described in a list instead of separate sections. The type property has also been renamed to action. For following YAML code illustrates the new item actions configuration:
Code (YAML):
diamond:
item:
type
: DIAMOND
symbol
:
"D"
actions:
- action
:
"ACTION_1"
property1
: <data>
property2
: <data>
- action
:
"ACTION_2"
property1
: <data>
- action
:
"ACTION_3"
- Due to the item actions configuration changes, action loaders (e.g. classes that implement the ClickActionLoader interface) now loads their data from a ConfigurationMap instead of a ConfigurationSection.
- Integrated the CraftStack library for item configuration. CraftStack item configuration replaces the old custom item configuration system as well as the Bukkit ItemStack configuration system.
Note: CraftStack is more flexible and can be extended more easily than the previous custom item configuration system. The Bukkit ItemStack configuration system has also been removed to unify configurations and because it is also not well documented.
- Updated the configuration of navigation items in paginations by adding an intermediate `navigation-item` section to define the item.
Example:
Code (YAML):
previous-page-item:
navigation-item:
item:
type
: PAPER
display-name
:
"&bPrevious page"
symbol
:
"P"
next-page-item:
navigation-item:
item:
type
: PAPER
display-name
:
"&bNext page"
symbol
:
"N"
Note: This change has been implemented to anticipate a future update that will add the ability to configure replacement items when no navigation is possible.
- Renamed the property id to inventory-id.
Other changes:
- Updated Crafter dependency to version 1.2.0.
- Removed Crafter dependency relocation to avoid class duplication in projects where Crafter is used too.
- Removed the ALL click type. Now, no click type specified means that all click types are allowed.
Fixes:
- Fixed wrong parent class for some action loaders.