WolfyScript / viewportl

A Minecraft Inventory GUI framework, designed to easily create reactive GUIs. Based on the well known Signal Reactivity System.
GNU General Public License v3.0
68 stars 12 forks source link

Plugin Adapters & Plugins implementation fixes #66

Closed WolfyScript closed 2 years ago

WolfyScript commented 2 years ago

Adds plugin adapters as an util to manage plugin dependent listeners or other classes.

A manager is registered using the method Plugins#registerAdapter(pluginName : String, adapter : Supplier<PluginAdapter>). The supplier is only called if the specified plugin is available at the time of invocation.

The adapter just requires a NamespacedKey, as you can register multiple adapters for a single plugin. You can then get it via Plugins#getAdapter(pluginName : String, type : Class<T>, key : NamespacedKey)

Bug Fixes