WolfyUtilities | Core API [1.17.1 - 1.21.1] icon

WolfyUtilities | Core API [1.17.1 - 1.21.1] -----

Inventory GUI API, JSON/HOCON Serialization, Plugin Compatibility Utils, etc.



Rewrite, Bug Fixes & new GUI system | APIv3 - v1.6.3.4
upload_2021-2-3_17-45-32.png
WolfyUtilities was mainly rewritten and reworked to fix many issues and make it modular, easy to extend, and especially develop.

The core is now split into two packages /api and /util.
/api contains all the APIs that are only available via an instance of the WolfyUtilites API linked to the specific plugin.
/util contains all the static utils, which can be used anywhere without any additional instances.

This update will be available directly on SpigotMC temporarily, while my website is in development.

GUI
The GUI was completely rewritten to provide a more responsive and stable GUI.
To make this work the GUI API now uses NMS to create custom Inventories that are based on the internal Bukkit Inventory and are completely compatible with Bukkits Inventory API like events, etc.
The API provides new methods and life cycles for custom GUI menus to further customize them and also provides a new way to manage custom caches and make sure you are always using the correct one.
The Buttons are also reworked to require less Boilerplate code and provide more lifecycles like preRender or postExecute, which allows you to better prepare and process data for buttons.


Registry
WolfyUtilities now uses a Registry to register all the custom objects that implement the Keyed interface. This makes it easier to scale data like CustomItems and other data and receive it in code.


Versions
Comparing versions is now easier and doesn’t use weird values anymore.
The API for it is part of the /util package and therefore is available everywhere.
The methods to check for mc version can be found in ServerVersion.


NMSUtil
The new NMSUtil is part of the /api subpackage and requires a WolfyUtilities to be accessed.
Once you got the instance of it you can use some util classes, that make use of CraftBukkit and NMS without any reflection. Note that this API lacks a lot of features at this point, but will be extended in the future.
Current features include a way to serialize/deserialize items in the vanilla JSON format, create GUIInventories (Extends the Inventory interface to include additional WU objects. Completely compatible with Bukkit and is accessible in InventoryClickEvents, etc.), get the NMSBrewingStand to edit values of the tile entity directly (instead of Bukkit, which edits a copy).


Custom Items
The main goal with custom items in this update was to make them modular, meaning that you can easily register your own custom data, meta checks, etc.
Additionally to this, the meta checks are no longer limited to one value (ignore, exact, etc.), but can also be configured with even more options.

To register your own data and meta checks you need to use the Registry.
Code (Java):

//These should be put into your plugins load(); method so you can make sure it is registered before items are loaded.

//Register Meta checks
Registry. META_PROVIDER. register (NamespacedKey. of (“namespace”,”key” ), YourMeta. class ) ;
//Register CustomData for CustomItems
Registry. CUSTOM_ITEM_DATA. register ( <A provider of your custom data > ) ;
//The provider is created using a class that extends it. It’s used to provide new instances and them to custom items.
 

3rd party API support
MMOItems APIReference is now implemented to add support items from MMOItems.
ItemsAdder support was removed due to incompatibility with other plugins like CustomCrafting.


Bug Fixes
  • Fixed critical issues in the GUI that caused errors and allowed players to take out items sometimes.
  • Fixed the consuming settings of CustomItems. Like "consumed", "replacement" and "durability cost"
  • Fixed CustomItemBreakEvent still dropping items if dropsItems is false
  • Chat Clicks are no longer executed in the CommandPreprocessCommand to be inline with Spigots API
  • The cached Click Actions are no longer plugin dependent
  • Fixed custom durability namespaced keys containing invalid characters.
  • Fixed and cleaned up AbstractItemBuilder to make sure that it uses the correct type.
----------, Feb 3, 2021
Resource Information
Author:
----------
Total Downloads: 107,480
First Release: Jan 19, 2019
Last Update: May 2, 2024
Category: ---------------
All-Time Rating:
11 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings