TriumphTeam / triumph-gui

Simple lib to create inventory GUIs for Bukkit platforms.
MIT License
330 stars 57 forks source link

Support for `libraries` #82

Open Vrganj opened 1 year ago

Vrganj commented 1 year ago

I can use the library by shading, but not the newer libraries feature in plugin.yml.

The issue is this: https://github.com/TriumphTeam/triumph-gui/blob/master/core/src/main/java/dev/triumphteam/gui/guis/BaseGui.java#L67

JavaPlugin#getProvidingPlugin throws an exception since libraries aren't provided by plugins.

Vrganj commented 1 year ago

Same issue occurs in core/src/main/java/dev/triumphteam/gui/components/nbt/Pdc.java

iGabyTM commented 1 year ago

The library depends on a plugin to register events and work with PDC, I don't think anything can be done to support spigot's libraries system.

Vrganj commented 1 year ago

I think the plugin that's using the library should be able to supply the instance. Of course this can be a fallback method if you don't supply it.